public class ReplicationStore extends HAStoreBase
_debug, _logLevel, applicationId, clusterId, ioUtilsdebug, info, lifecycle, manager, started, storeName, supportAFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
ReplicationStore(JavaEEIOUtils ioUtils)
Creates a new instance of ReplicationStore
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
void |
clear()
Clear sessions
|
void |
doRemove(String id)
Remove the Session with the specified session identifier from
this Store, if present.
|
void |
doSave(Session session)
Save the specified Session into this Store.
|
void |
doValveSave(Session session)
Save the specified Session into this Store.
|
String |
getApplicationId() |
Session |
getSession(byte[] state,
long version) |
BaseCache |
getSessions() |
int |
getSize()
return the size of the store cache
will be over-ridden in subclasses
|
protected long |
getUniqueId() |
protected boolean |
isReplicationCompressionEnabled() |
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.
|
Session |
load(String id,
String version)
Load and return the Session associated with the specified session
identifier from this Store, without removing it.
|
void |
processExpires()
Called by our background reaper thread to remove expired
sessions in the replica - this can be done on the same
instance - i.e.
|
int |
removeExpiredSessions()
This method deletes all the sessions corresponding to the "appId"
that should be expired
|
void |
removeSynchronized(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 |
setSessions(BaseCache sesstable) |
void |
stop()
Gracefully terminate the active use of the public methods of this
component.
|
void |
updateLastAccessTime(Session session)
update the lastaccess time of the specified Session into this Store.
|
void |
valveSave(Session session)
Save the specified Session into this Store.
|
debug, getByteArray, getByteArray, getClusterId, getClusterIdFromConfig, remove, setLogLeveladdLifecycleListener, addPropertyChangeListener, doProcessExpires, findLifecycleListeners, getDebug, getInfo, getManager, getStoreName, log, readSession, removeFromStoreCache, removeLifecycleListener, removePropertyChangeListener, setDebug, setManager, start, writeSessionpublic ReplicationStore(JavaEEIOUtils ioUtils)
public String getApplicationId()
getApplicationId in class HAStoreBasepublic void valveSave(Session session) throws IOException
session - Session to be savedIOException - if an input/output error occurspublic void doValveSave(Session session) throws IOException
session - Session to be savedIOException - if an input/output error occurspublic void cleanup()
public BaseCache getSessions()
public void setSessions(BaseCache sesstable)
public void stop()
StoreBasepublic void save(Session session) throws IOException
session - Session to be savedIOException - if an input/output error occursprotected boolean isReplicationCompressionEnabled()
public void doSave(Session session) throws IOException
session - Session to be savedIOException - if an input/output error occurspublic void clear()
throws IOException
IOException - if an input/output error occurspublic void doRemove(String id) throws IOException
doRemove in class HAStoreBaseid - Session identifier of the Session to be removedIOException - if an input/output error occurspublic void removeSynchronized(String id) throws IOException
removeSynchronized in class HAStoreBaseid - Session identifier of the Session to be removedIOException - if an input/output error occurspublic void processExpires()
processExpires in class StoreBasepublic int removeExpiredSessions()
public Session load(String id) throws ClassNotFoundException, IOException
null.id - Session identifier of the session to loadClassNotFoundException - if a deserialization error occursIOException - if an input/output error occurspublic Session load(String id, String version) throws ClassNotFoundException, IOException
StoreBasenull.load in class StoreBaseid - Session identifier of the session to loadversion - The requested session versionClassNotFoundException - if a deserialization error occursIOException - if an input/output error occurspublic void updateLastAccessTime(Session session) throws IOException
session - Session to be savedIOException - if an input/output error occurspublic String[] keys() throws IOException
IOException - if an input/output error occurredpublic int getSize()
throws IOException
HAStoreBasegetSize in interface StoregetSize in class HAStoreBaseIOException - if an input/output error occursprotected long getUniqueId()
public Session getSession(byte[] state, long version) throws IOException
IOExceptionCopyright © 2017. All rights reserved.