public final class FileStore extends StoreBase implements Store
lifecycle, manager, started, supportAFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
FileStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all of the Sessions in this Store.
|
String |
getDirectory()
Return the directory path for this Store.
|
String |
getInfo()
Return descriptive information about this Store implementation and
the corresponding version number, in the format
<description>/<version>. |
int |
getSize()
Return the number of Sessions present in this Store.
|
String |
getStoreName()
Return the name for this Store, used for logging.
|
String |
getThreadName()
Return the thread name for this Store.
|
String[] |
keys()
Return an array containing the session identifiers of all Sessions
currently saved in this Store.
|
Session |
load(String id)
Load and return the Session associated with the specified session
identifier from this Store, without removing it.
|
void |
remove(String id)
Remove the Session with the specified session identifier from
this Store, if present.
|
void |
save(Session session)
Save the specified Session into this Store.
|
void |
setDirectory(String path)
Set the directory path for this Store.
|
addLifecycleListener, addPropertyChangeListener, findLifecycleListeners, getManager, processExpires, removeLifecycleListener, removePropertyChangeListener, setManager, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, getManager, removePropertyChangeListener, setManagerpublic String getDirectory()
public void setDirectory(String path)
path - The new directory pathpublic String getInfo()
<description>/<version>.public String getThreadName()
public String getStoreName()
getStoreName in class StoreBasepublic int getSize()
throws IOException
getSize in interface StoreIOException - if an input/output error occurspublic void clear()
throws IOException
clear in interface StoreIOException - if an input/output error occurspublic String[] keys() throws IOException
keys in interface StoreIOException - if an input/output error occurredpublic Session load(String id) throws ClassNotFoundException, IOException
null.load in interface Storeid - Session identifier of the session to loadClassNotFoundException - if a deserialization error occursIOException - if an input/output error occurspublic void remove(String id) throws IOException
remove in interface Storeid - Session identifier of the Session to be removedIOException - if an input/output error occurspublic void save(Session session) throws IOException
save in interface Storesession - Session to be savedIOException - if an input/output error occursCopyright © 2016 JBoss by Red Hat. All rights reserved.