public abstract class HAStoreBase extends StoreBase
Modifier and Type | Field and Description |
---|---|
protected int |
_debug
Controls the verbosity of the web container subsystem's debug messages.
|
protected Level |
_logLevel
The current level of logging verbosity for this object.
|
protected String |
applicationId
The application id
|
protected String |
clusterId
The cluster id
|
protected JavaEEIOUtils |
ioUtils |
debug, info, lifecycle, manager, started, storeName, support
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
HAStoreBase(JavaEEIOUtils ioUtils)
Creates a new instance of HAStoreBase
|
Modifier and Type | Method and Description |
---|---|
protected void |
debug(String message) |
void |
doRemove(String id)
Remove the Session with the specified session identifier from
this Store, if present.
|
String |
getApplicationId() |
byte[] |
getByteArray(Session session)
Create serialized byte[] for
obj . |
protected byte[] |
getByteArray(Session session,
boolean compress)
Create an byte[] for the session that we can then pass to
the HA Store.
|
protected String |
getClusterId()
Return the cluster id for this Store
|
protected String |
getClusterIdFromConfig()
Return the cluster id for this Store as defined in server.xml.
|
int |
getSize()
return the size of the store cache
will be over-ridden in subclasses
|
void |
remove(String id)
Remove the Session with the specified session identifier from
this Store, if present.
|
void |
removeSynchronized(String id)
Remove the Session with the specified session identifier from
this Store, if present.
|
protected void |
setLogLevel()
Set _debug flag and _logLevel based on the log level.
|
addLifecycleListener, addPropertyChangeListener, doProcessExpires, findLifecycleListeners, getDebug, getInfo, getManager, getStoreName, load, log, processExpires, readSession, removeFromStoreCache, removeLifecycleListener, removePropertyChangeListener, setDebug, setManager, start, stop, writeSession
protected JavaEEIOUtils ioUtils
protected int _debug
protected Level _logLevel
protected String applicationId
protected String clusterId
public HAStoreBase(JavaEEIOUtils ioUtils)
protected void debug(String message)
protected void setLogLevel()
public String getApplicationId()
protected String getClusterIdFromConfig()
protected String getClusterId()
public byte[] getByteArray(Session session) throws IOException
obj
.session
- - serialize objIOException
protected byte[] getByteArray(Session session, boolean compress) throws IOException
session
- The session we are serializingIOException
public void remove(String id) throws IOException
id
- Session identifier of the Session to be removedIOException
- if an input/output error occurspublic void doRemove(String id) throws IOException
id
- Session identifier of the Session to be removedIOException
- if an input/output error occurspublic void removeSynchronized(String id) throws IOException
id
- Session identifier of the Session to be removedIOException
- if an input/output error occurspublic int getSize() throws IOException
IOException
- if an input/output error occursCopyright © 2020. All rights reserved.