|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.session.StoreBase
org.glassfish.web.ha.session.management.HAStoreBase
org.glassfish.web.ha.session.management.ReplicationStore
public class ReplicationStore
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
_logger
The logger to use for logging ALL web container related messages. |
| Fields inherited from class org.glassfish.web.ha.session.management.HAStoreBase |
|---|
_debug, _logLevel, applicationId, clusterId, ioUtils, serverConfigLookup |
| Fields inherited from class org.apache.catalina.session.StoreBase |
|---|
debug, info, lifecycle, manager, sm, started, storeName, support |
| Fields inherited from interface org.apache.catalina.Lifecycle |
|---|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT |
| Constructor Summary | |
|---|---|
ReplicationStore(ServerConfigLookup serverConfigLookup,
JavaEEIOUtils ioUtils)
Creates a new instance of ReplicationStore |
|
| Method Summary | |
|---|---|
void |
clear()
Clear sessions |
void |
doRemove(java.lang.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. |
java.lang.String |
getApplicationId()
|
Session |
getSession(byte[] state,
long version)
|
int |
getSize()
return the size of the store cache will be over-ridden in subclasses |
protected boolean |
isReplicationCompressionEnabled()
|
java.lang.String[] |
keys()
Return an array containing the session identifiers of all Sessions currently saved in this Store. |
Session |
load(java.lang.String id)
Load and return the Session associated with the specified session identifier from this Store, without removing it. |
Session |
load(java.lang.String id,
java.lang.String version)
|
Session |
loadFromBackingStore(java.lang.String id,
java.lang.String version)
|
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(java.lang.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 |
stop()
|
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. |
| Methods inherited from class org.glassfish.web.ha.session.management.HAStoreBase |
|---|
debug, getByteArray, getByteArray, getClusterId, getClusterIdFromConfig, remove, setLogLevel |
| Methods inherited from class org.apache.catalina.session.StoreBase |
|---|
addLifecycleListener, addPropertyChangeListener, doProcessExpires, findLifecycleListeners, getDebug, getInfo, getManager, getStoreName, log, readSession, removeFromStoreCache, removeLifecycleListener, removePropertyChangeListener, setDebug, setManager, start, writeSession |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger _logger
| Constructor Detail |
|---|
public ReplicationStore(ServerConfigLookup serverConfigLookup,
JavaEEIOUtils ioUtils)
| Method Detail |
|---|
public java.lang.String getApplicationId()
getApplicationId in class HAStoreBase
public void valveSave(Session session)
throws java.io.IOException
session - Session to be saved
java.io.IOException - if an input/output error occurs
public void doValveSave(Session session)
throws java.io.IOException
session - Session to be saved
java.io.IOException - if an input/output error occurspublic void stop()
stop in interface Lifecyclestop in class StoreBase
public void save(Session session)
throws java.io.IOException
session - Session to be saved
java.io.IOException - if an input/output error occursprotected boolean isReplicationCompressionEnabled()
public void doSave(Session session)
throws java.io.IOException
session - Session to be saved
java.io.IOException - if an input/output error occurs
public void clear()
throws java.io.IOException
java.io.IOException - if an input/output error occurs
public void doRemove(java.lang.String id)
throws java.io.IOException
doRemove in class HAStoreBaseid - Session identifier of the Session to be removed
java.io.IOException - if an input/output error occurs
public void removeSynchronized(java.lang.String id)
throws java.io.IOException
removeSynchronized in class HAStoreBaseid - Session identifier of the Session to be removed
java.io.IOException - if an input/output error occurspublic void processExpires()
processExpires in class StoreBasepublic int removeExpiredSessions()
public Session load(java.lang.String id)
throws java.lang.ClassNotFoundException,
java.io.IOException
null.
id - Session identifier of the session to load
java.lang.ClassNotFoundException - if a deserialization error occurs
java.io.IOException - if an input/output error occurs
public Session load(java.lang.String id,
java.lang.String version)
throws java.lang.ClassNotFoundException,
java.io.IOException
load in class StoreBasejava.lang.ClassNotFoundException
java.io.IOException
public Session loadFromBackingStore(java.lang.String id,
java.lang.String version)
throws java.io.IOException,
java.lang.ClassNotFoundException,
org.glassfish.ha.store.api.BackingStoreException
java.io.IOException
java.lang.ClassNotFoundException
org.glassfish.ha.store.api.BackingStoreException
public void updateLastAccessTime(Session session)
throws java.io.IOException
session - Session to be saved
java.io.IOException - if an input/output error occurs
public java.lang.String[] keys()
throws java.io.IOException
java.io.IOException - if an input/output error occurred
public int getSize()
throws java.io.IOException
HAStoreBase
getSize in interface StoregetSize in class HAStoreBasejava.io.IOException
public Session getSession(byte[] state,
long version)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||