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 void
destroy()
org.glassfish.ha.store.api.BackingStoreFactory
getBackingStoreFactory()
protected void
initialize(org.glassfish.ha.store.api.BackingStoreConfiguration<K,V> conf)
V
load(K key, String version)
void
remove(K sessionKey)
int
removeExpired()
int
removeExpired(long idleForMillis)
String
save(K sessionKey, V value, boolean isNew)
void
shutdown()
int
size()
void
updateTimestamp(K sessionKey, long time)
void
updateTimeStamp(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:
initialize
in 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:
getBackingStoreFactory
in 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:
load
in 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:
remove
in classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
destroy
public void destroy()
- Overrides:
destroy
in classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
removeExpired
public int removeExpired()
- Overrides:
removeExpired
in classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
-
removeExpired
public int removeExpired(long idleForMillis)
- Overrides:
removeExpired
in 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:
size
in 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:
save
in 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:
updateTimestamp
in classorg.glassfish.ha.store.api.BackingStore<K extends Serializable,V extends Serializable>
- Throws:
org.glassfish.ha.store.api.BackingStoreException
-
-