|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.cluster.StoreManager
com.caucho.server.cluster.ClusterStoreManager
com.caucho.server.cluster.ClusterStore
public class ClusterStore
The ClusterStore manages a cluster of servers all backing up their sessions to the next server.
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.cluster.ClusterStoreManager |
|---|
log |
| Fields inherited from class com.caucho.server.cluster.StoreManager |
|---|
_clusterObjects, _idleCheckInterval, _isAlwaysLoad, _isAlwaysSave, _loadCount, _loadFailCount, _maxIdleTime, _saveCount, _saveFailCount, _selfIndex, _storeMap |
| Constructor Summary | |
|---|---|
ClusterStore()
|
|
| Method Summary | |
|---|---|
void |
accessImpl(java.lang.String uniqueId)
Updates the object's access time. |
void |
clearOldObjects()
Clears the old objects. |
void |
destroy()
Called at end of life. |
void |
dumpObjects(WriteStream os,
int srun,
long updateTime)
|
PersistentStoreMXBean |
getAdmin()
Returns the admin. |
long |
getObjectCount()
Returns the objects in the store |
Path |
getPath()
|
boolean |
init()
Called after any factory settings. |
boolean |
load(ClusterObject clusterObject,
java.lang.Object obj)
Loads a distributed object from the backing store |
boolean |
load(ClusterObject clusterObject,
java.lang.Object obj,
ServerConnector server)
|
void |
read(java.lang.String uniqueId,
WriteStream os)
Reads from the store. |
void |
remove(ClusterObject object)
When the session is no longer valid, remove it from the backing store. |
void |
remove(java.lang.String storeId,
java.lang.String objectId)
When the object is no longer valid, remove it from the backing store. |
void |
setCluster(Cluster cluster)
Sets the cluster. |
void |
setJndiName(java.lang.String name)
|
void |
setPath(Path path)
|
void |
setTriplicate(boolean isTriplicate)
Set true if the data should be stored in triplicate. |
void |
setWaitForAcknowledge(boolean isWait)
Set true if the requests to wait for an ack. |
boolean |
start()
Called to start the store. |
void |
store(ClusterObject object,
TempStream tempStream,
long crc)
Stores the object in the backup. |
void |
storeOnShutdown(DistributedObject object)
The ring store has already stored the object, so this is unneeded. |
java.lang.String |
toString()
|
void |
update(java.lang.String serverId,
java.lang.String uniqueId,
ReadStream is,
long expireInterval)
Updates the store. |
void |
updateAccess(java.lang.String uniqueId)
Updates the object's access time. |
| Methods inherited from class com.caucho.server.cluster.ClusterStoreManager |
|---|
getPrimaryIndex, getPrimaryServer, getSecondaryIndex, getSecondaryServer, getTertiaryIndex, getTertiaryServer, ping, updateOwner |
| Methods inherited from class com.caucho.server.cluster.StoreManager |
|---|
access, access, classLoaderDestroy, classLoaderInit, createStore, environmentStart, environmentStop, getAccessWindowTime, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getOwningServer, getSaveCount, getSaveFailCount, getSelfIndex, getServerList, getStore, handleAlarm, isAlwaysLoad, isAlwaysSave, isPrimary, remove, removeStore, setAlwaysLoad, setAlwaysSave, setExpireInterval, setMaxIdleTime, store, update, updateIdleCheckInterval |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterStore()
| Method Detail |
|---|
public void setCluster(Cluster cluster)
StoreManager
setCluster in class StoreManagerpublic Path getPath()
public void setPath(Path path)
public void setJndiName(java.lang.String name)
public void setTriplicate(boolean isTriplicate)
public void setWaitForAcknowledge(boolean isWait)
public PersistentStoreMXBean getAdmin()
StoreManager
getAdmin in class StoreManager
public boolean init()
throws java.lang.Exception
StoreManager
init in class StoreManagerjava.lang.Exception
public boolean start()
throws java.lang.Exception
StoreManager
start in class StoreManagerjava.lang.Exception
public void clearOldObjects()
throws java.sql.SQLException
clearOldObjects in class StoreManagerjava.sql.SQLException
public boolean load(ClusterObject clusterObject,
java.lang.Object obj)
throws java.lang.Exception
load in class StoreManagerclusterObject - the cluster object to loadobj - the underlying object to load
java.lang.Exception
public boolean load(ClusterObject clusterObject,
java.lang.Object obj,
ServerConnector server)
throws java.lang.Exception
java.lang.Exception
public void storeOnShutdown(DistributedObject object)
throws java.lang.Exception
java.lang.Exception
public void store(ClusterObject object,
TempStream tempStream,
long crc)
throws java.lang.Exception
store in class StoreManagerobject - the object to store.
java.lang.Exception
public void updateAccess(java.lang.String uniqueId)
throws java.lang.Exception
obj - the object to store.
java.lang.Exception
public void accessImpl(java.lang.String uniqueId)
throws java.lang.Exception
accessImpl in class StoreManagerobj - the object to store.
java.lang.Exception
public void remove(java.lang.String storeId,
java.lang.String objectId)
throws java.lang.Exception
storeId - the identifier of the storeage groupobjectId - the identifier of the object to remove
java.lang.Exception
public void remove(ClusterObject object)
throws java.lang.Exception
remove in class StoreManagerobject - the object to remove
java.lang.Exceptionpublic long getObjectCount()
StoreManager
getObjectCount in class StoreManager
public void update(java.lang.String serverId,
java.lang.String uniqueId,
ReadStream is,
long expireInterval)
throws java.io.IOException
java.io.IOException
public void read(java.lang.String uniqueId,
WriteStream os)
throws java.io.IOException
java.io.IOException
public void dumpObjects(WriteStream os,
int srun,
long updateTime)
throws java.io.IOException
java.io.IOExceptionpublic void destroy()
StoreManager
destroy in class StoreManagerpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||