|
||||||||||
| 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.AbstractClusterStoreManager
com.caucho.server.cluster.ClusterStoreManager
public class ClusterStoreManager
The ClusterStoreManager manages a cluster of servers all backing up their sessions to the next server.
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.cluster.StoreManager |
|---|
_clusterObjects, _idleCheckInterval, _isAlwaysLoad, _isAlwaysSave, _loadCount, _loadFailCount, _maxIdleTime, _saveCount, _saveFailCount, _selfIndex, _storeMap |
| Constructor Summary | |
|---|---|
ClusterStoreManager()
|
|
| Method Summary | |
|---|---|
void |
accessImpl(ClusterObject object)
Updates the object's objectAccess time. |
void |
accessImpl(HashKey objectId)
Updates the object's objectAccess time. |
void |
clearOldObjects()
Clears the old objects. |
void |
destroy()
Called at end of life. |
void |
dumpObjects(int fromServerIndex,
long updateTime)
Callback to dump objects |
PersistentStoreMXBean |
getAdmin()
Returns the admin. |
long |
getObjectCount()
Returns the objects in the objectStore |
Path |
getPath()
|
boolean |
init()
Called after any factory settings. |
boolean |
load(ClusterObject object,
java.lang.Object value)
Loads a distributed object from the backing objectStore |
boolean |
load(ClusterObject object,
java.lang.Object value,
ClusterServer server)
|
byte[] |
read(HashKey key,
WriteStream os)
Reads from the objectStore. |
void |
remove(ClusterObject object)
When the session is no longer valid, objectRemove it from the backing objectStore. |
void |
remove(HashKey objectId)
When the object is no longer valid, objectRemove it from the backing objectStore. |
void |
save(HashKey objectId,
HashKey storeId,
long expireInterval,
java.io.InputStream is,
byte[] digest,
byte[] oldDigest,
int primary,
int secondary,
int tertiary)
Updates the objectStore. |
void |
setDumpDisable(boolean isDisable)
Disable the dump on startup |
void |
setJndiName(java.lang.String name)
|
void |
setPath(Path path)
|
void |
setSaveBackup(boolean isBackup)
Set true if the data should be stored on a backup server |
void |
setSaveTriplicate(boolean isTriplicate)
Set true if the data should be stored in triplicate. |
void |
setTriplicate(boolean isTriplicate)
Set true if the data should be stored in triplicate. |
void |
setVersionDisable(boolean isDisable)
Disable version checking for startup |
void |
setWaitForAcknowledge(boolean isWait)
Set true if the requests to wait for an ack. |
boolean |
start()
Called to start the objectStore. |
boolean |
startUpdate()
Called to start any invalidate processing |
void |
store(ClusterObject object,
TempOutputStream tempOutputStream,
byte[] digest,
byte[] oldDigest)
Stores the object in the backup. |
java.lang.String |
toString()
|
void |
updateAccess(HashKey objectId)
Updates the object's objectAccess time. |
void |
updateMetadata(HashKey objectId,
HashKey storeId,
byte[] dataHash,
long expireInterval,
int primary,
int secondary,
int tertiary,
boolean isDead)
Updates the store from the cluster based on a dump. |
| Methods inherited from class com.caucho.server.cluster.AbstractClusterStoreManager |
|---|
getPrimaryIndex, getPrimaryServer, getSecondaryIndex, getSecondaryServer, getTertiaryIndex, getTertiaryServer, ping, updateOwner |
| Methods inherited from class com.caucho.server.cluster.StoreManager |
|---|
access, access, classLoaderDestroy, classLoaderInit, create, createStore, environmentBind, environmentConfigure, environmentStart, environmentStop, getAccessWindowTime, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getOwningServer, getSaveCount, getSaveFailCount, getSelfIndex, getServerList, getStore, handleAlarm, invalidate, isAlwaysLoad, isAlwaysSave, isPrimary, remove, removeStore, setAlwaysLoad, setAlwaysSave, setCluster, setExpireInterval, setMaxIdleTime, updateIdleCheckInterval |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterStoreManager()
| Method Detail |
|---|
public Path getPath()
public void setPath(Path path)
public void setJndiName(java.lang.String name)
public void setDumpDisable(boolean isDisable)
public void setVersionDisable(boolean isDisable)
public void setSaveBackup(boolean isBackup)
public void setSaveTriplicate(boolean isTriplicate)
public void setTriplicate(boolean isTriplicate)
public void setWaitForAcknowledge(boolean isWait)
public PersistentStoreMXBean getAdmin()
StoreManager
getAdmin in class StoreManagerpublic boolean init()
StoreManager
init in class StoreManager
public boolean start()
throws java.lang.Exception
StoreManager
start in class StoreManagerjava.lang.Exception
public boolean startUpdate()
throws java.lang.Exception
StoreManager
startUpdate in class StoreManagerjava.lang.Exception
public void clearOldObjects()
throws java.sql.SQLException
clearOldObjects in class StoreManagerjava.sql.SQLException
public boolean load(ClusterObject object,
java.lang.Object value)
throws java.lang.Exception
load in class StoreManagerobject - the cluster object to loadImplvalue - the underlying object to loadImpl
java.lang.Exception
public boolean load(ClusterObject object,
java.lang.Object value,
ClusterServer server)
throws java.lang.Exception
java.lang.Exception
public void store(ClusterObject object,
TempOutputStream tempOutputStream,
byte[] digest,
byte[] oldDigest)
throws java.lang.Exception
store in class StoreManagerobject - the object to objectStore.tempOutputStream - the byte stream to the saved datadigest - the sha-1 hash of the dataoldDigest - the previous hash value for the data
java.lang.Exception
public void updateAccess(HashKey objectId)
throws java.lang.Exception
value - the object to objectStore.
java.lang.Exception
public void accessImpl(HashKey objectId)
throws java.lang.Exception
accessImpl in class StoreManagervalue - the object to objectStore.
java.lang.Exception
public void accessImpl(ClusterObject object)
throws java.lang.Exception
accessImpl in class StoreManagervalue - the object to objectStore.
java.lang.Exception
public void remove(HashKey objectId)
throws java.lang.Exception
storeId - the identifier of the storeage groupobjectId - the identifier of the object to objectRemove
java.lang.Exception
public void remove(ClusterObject object)
throws java.lang.Exception
remove in class StoreManagerobject - the object to objectRemove
java.lang.Exceptionpublic long getObjectCount()
StoreManager
getObjectCount in class StoreManager
public void save(HashKey objectId,
HashKey storeId,
long expireInterval,
java.io.InputStream is,
byte[] digest,
byte[] oldDigest,
int primary,
int secondary,
int tertiary)
throws java.io.IOException
java.io.IOException
public void updateMetadata(HashKey objectId,
HashKey storeId,
byte[] dataHash,
long expireInterval,
int primary,
int secondary,
int tertiary,
boolean isDead)
public byte[] read(HashKey key,
WriteStream os)
throws java.io.IOException
java.io.IOException
public void dumpObjects(int fromServerIndex,
long updateTime)
throws java.io.IOException
java.io.IOExceptionpublic void destroy()
StoreManager
destroy in class StoreManagerpublic java.lang.String toString()
toString in class StoreManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||