|
||||||||||
| 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.FileStore
public class FileStore
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, log |
| Constructor Summary | |
|---|---|
FileStore()
Create a new file-based persistent store. |
|
| Method Summary | |
|---|---|
void |
accessImpl(java.lang.String uniqueId)
Updates the object's access time in the persistent store. |
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, remove it from the backing store. |
void |
setExpireInterval(java.lang.String uniqueId,
long expires)
Sets the timef for the expires interval. |
void |
setPath(Path path)
Sets the file store's path. |
boolean |
start()
Start |
void |
store(ClusterObject obj,
TempStream tempStream,
long crc)
Saves the session to the filesystem. |
java.lang.String |
toString()
|
| Methods inherited from class com.caucho.server.cluster.StoreManager |
|---|
access, access, classLoaderDestroy, classLoaderInit, createStore, destroy, environmentStart, environmentStop, getAccessWindowTime, getAdmin, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getObjectCount, getOwningServer, getPrimaryIndex, getSaveCount, getSaveFailCount, getSecondaryIndex, getSelfIndex, getServerList, getStore, getTertiaryIndex, handleAlarm, isAlwaysLoad, isAlwaysSave, remove, removeStore, setAlwaysLoad, setAlwaysSave, setCluster, setMaxIdleTime, store, update, updateIdleCheckInterval, updateOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileStore()
| Method Detail |
|---|
public void setPath(Path path)
public void addText(java.lang.String value)
public Path getPath()
public boolean init()
throws java.lang.Exception
init in class StoreManagerjava.lang.Exception
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 update.
java.lang.Exception
public void store(ClusterObject obj,
TempStream tempStream,
long crc)
throws java.lang.Exception
store in class StoreManagerobj - the object to savetempStream - stream to the serialized objectcrc - digest of the serialized streamupdateCount - how many times the object has been updated
java.lang.Exception
public void accessImpl(java.lang.String uniqueId)
throws java.lang.Exception
accessImpl in class StoreManageruniqueId - the identifier of the object.
java.lang.Exception
public void setExpireInterval(java.lang.String uniqueId,
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 remove
java.lang.Exceptionpublic 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 | |||||||||