Class FileBackingStore<K extends Serializable,V extends Serializable>
- java.lang.Object
-
- org.glassfish.ha.store.api.BackingStore<K,V>
-
- org.glassfish.ha.store.adapter.file.FileBackingStore<K,V>
-
public class FileBackingStore<K extends Serializable,V extends Serializable> extends org.glassfish.ha.store.api.BackingStore<K,V>An implementation of BackingStore that uses file system to persist any Serializable data- Author:
- Mahesh Kannan
-
-
Constructor Summary
Constructors Constructor Description FileBackingStore()No arg constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()org.glassfish.ha.store.api.BackingStoreFactorygetBackingStoreFactory()protected voidinitialize(org.glassfish.ha.store.api.BackingStoreConfiguration<K,V> conf)Vload(K key, String version)voidremove(K sessionKey)intremoveExpired()intremoveExpired(long idleForMillis)Stringsave(K sessionKey, V value, boolean isNew)voidshutdown()intsize()voidupdateTimestamp(K sessionKey, long time)voidupdateTimeStamp(K k, String version, long timeStamp)
-
-
-
Method Detail
-
initialize
protected void initialize(org.glassfish.ha.store.api.BackingStoreConfiguration<K,V> conf) throws org.glassfish.ha.store.api.BackingStoreException
- Overrides:
initializein classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
getBackingStoreFactory
public org.glassfish.ha.store.api.BackingStoreFactory getBackingStoreFactory()
- Specified by:
getBackingStoreFactoryin classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
load
public V load(K key, String version) throws org.glassfish.ha.store.api.BackingStoreException
- Specified by:
loadin classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
remove
public void remove(K sessionKey)
- Specified by:
removein classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
destroy
public void destroy()
- Overrides:
destroyin classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
removeExpired
public int removeExpired()
- Overrides:
removeExpiredin classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
removeExpired
public int removeExpired(long idleForMillis)
- Overrides:
removeExpiredin classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
shutdown
public void shutdown()
-
size
public int size() throws org.glassfish.ha.store.api.BackingStoreException- Specified by:
sizein classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
save
public String save(K sessionKey, V value, boolean isNew) throws org.glassfish.ha.store.api.BackingStoreException
- Specified by:
savein classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
updateTimeStamp
public void updateTimeStamp(K k, String version, long timeStamp) throws org.glassfish.ha.store.api.BackingStoreException
- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
updateTimestamp
public void updateTimestamp(K sessionKey, long time) throws org.glassfish.ha.store.api.BackingStoreException
- Overrides:
updateTimestampin classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
-