|
||||||||||
| 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.FileStoreManager
public class FileStoreManager
Class storing distributed objects based on the filesystem.
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.cluster.StoreManager |
|---|
_clusterObjects, _idleCheckInterval, _isAlwaysLoad, _isAlwaysSave, _loadCount, _loadFailCount, _maxIdleTime, _saveCount, _saveFailCount, _selfIndex, _storeMap |
| Constructor Summary | |
|---|---|
FileStoreManager()
Create a new file-based persistent objectStore. |
|
| Method Summary | |
|---|---|
void |
accessImpl(HashKey objectId)
Updates the object's objectAccess time in the persistent objectStore. |
void |
addText(java.lang.String value)
|
void |
clearOldObjects()
Clears the files which are too old. |
Path |
getPath()
|
boolean |
init()
Initialize. |
protected boolean |
isPrimary(java.lang.String id)
Returns true if this server is a primary for the given object id. |
boolean |
load(ClusterObject clusterObj,
java.lang.Object obj)
Loads the session from the filesystem. |
void |
remove(ClusterObject obj)
When the session is no longer valid, objectRemove it from the backing objectStore. |
void |
setExpireInterval(HashKey objectId,
long expires)
Sets the timef for the expires interval. |
void |
setPath(Path path)
Sets the file objectStore's path. |
boolean |
start()
Start |
void |
store(ClusterObject obj,
TempOutputStream tempStream,
byte[] dataHash,
byte[] oldDataHash)
Saves the session to the filesystem. |
| Methods inherited from class com.caucho.server.cluster.StoreManager |
|---|
access, access, accessImpl, classLoaderDestroy, classLoaderInit, create, createStore, destroy, environmentBind, environmentConfigure, environmentStart, environmentStop, getAccessWindowTime, getAdmin, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getObjectCount, getOwningServer, getPrimaryIndex, getSaveCount, getSaveFailCount, getSecondaryIndex, getSelfIndex, getServerList, getStore, getTertiaryIndex, handleAlarm, invalidate, isAlwaysLoad, isAlwaysSave, remove, removeStore, setAlwaysLoad, setAlwaysSave, setCluster, setMaxIdleTime, startUpdate, toString, updateIdleCheckInterval, updateOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileStoreManager()
| Method Detail |
|---|
public void setPath(Path path)
public void addText(java.lang.String value)
public Path getPath()
public boolean init()
init in class StoreManager
public boolean start()
throws java.lang.Exception
start in class StoreManagerjava.lang.Exceptionpublic void clearOldObjects()
clearOldObjects in class StoreManagerprotected boolean isPrimary(java.lang.String id)
isPrimary in class StoreManager
public boolean load(ClusterObject clusterObj,
java.lang.Object obj)
throws java.lang.Exception
load in class StoreManagerclusterObj - the object to fillobj - the object to updateImpl.
java.lang.Exception
public void store(ClusterObject obj,
TempOutputStream tempStream,
byte[] dataHash,
byte[] oldDataHash)
throws java.lang.Exception
store in class StoreManagerobj - the object to savetempStream - stream to the serialized objectdataHash - sha-1 hash of the datamupdateCount - how many times the object has been updated
java.lang.Exception
public void accessImpl(HashKey objectId)
throws java.lang.Exception
accessImpl in class StoreManageruniqueId - the identifier of the object.
java.lang.Exception
public void setExpireInterval(HashKey objectId,
long expires)
throws java.lang.Exception
setExpireInterval in class StoreManageruniqueId - the identifier of the object.long - the time in ms for the expire
java.lang.Exception
public void remove(ClusterObject obj)
throws java.lang.Exception
remove in class StoreManagerobj - the object to objectRemove
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||