Package com.tangosol.coherence.servlet
Class DefaultCacheDelegator
java.lang.Object
com.tangosol.coherence.servlet.DefaultCacheDelegator
- All Implemented Interfaces:
CacheDelegator
- Direct Known Subclasses:
LocalSessionCacheDelegator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String sId, AbstractHttpSessionCollection collection) Check if the cluster cache contains a session obj.Deletes the locally opened sessions in the session cache which have timed-out and returns the ids for deleted sessions.deleteExpiredSessions(AbstractHttpSessionCollection collection) Deletes the sessions in the session cache which have timed-out and returns the ids for deleted sessions.voiddeleteModel(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model) Delete the session from the cluster cache.voidflush(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model) Perform a flush operation of the session onto the cluster cacheRetrieve an iterator of potentially expired session ids.Retrieve an iterator of potentially expired session ids from the list of local sessions.getModel(String sId, AbstractHttpSessionCollection collection) Retrieve a model from the cluster cachegetModel(String sId, AbstractHttpSessionCollection collection, boolean fLite) Retrieve a model from the cluster cachevoidPerform an optimistic model update in the cache.voidputModel(AbstractHttpSessionModel model) Put a session model in the cache.voidUpdate a session model timestamp in the cache.
-
Field Details
-
LOGGER
The Logger object.
-
-
Constructor Details
-
DefaultCacheDelegator
public DefaultCacheDelegator()
-
-
Method Details
-
deleteModel
Description copied from interface:CacheDelegatorDelete the session from the cluster cache.- Specified by:
deleteModelin interfaceCacheDelegator- Parameters:
collection- the collection objmodel- the model obj
-
containsKey
Description copied from interface:CacheDelegatorCheck if the cluster cache contains a session obj.- Specified by:
containsKeyin interfaceCacheDelegator- Parameters:
sId- the session idcollection- the session collection obj- Returns:
- true, if the session obj exists in the cluster cache
-
getIteratorForPotentiallyExpiredIds
Description copied from interface:CacheDelegatorRetrieve an iterator of potentially expired session ids.- Specified by:
getIteratorForPotentiallyExpiredIdsin interfaceCacheDelegator- Parameters:
collection- the session collection obj- Returns:
- Iterator of potentially expired session ids
-
getIteratorForPotentiallyExpiredLocalIds
Description copied from interface:CacheDelegatorRetrieve an iterator of potentially expired session ids from the list of local sessions.- Specified by:
getIteratorForPotentiallyExpiredLocalIdsin interfaceCacheDelegator- Parameters:
collection- the session collection obj- Returns:
- iterator of potentially expired session local session ids
-
deleteExpiredSessions
Description copied from interface:CacheDelegatorDeletes the sessions in the session cache which have timed-out and returns the ids for deleted sessions.- Specified by:
deleteExpiredSessionsin interfaceCacheDelegator- Parameters:
collection- the session collection obj- Returns:
- the set of ids of sessions that are deleted
-
deleteExpiredLocalSessions
Description copied from interface:CacheDelegatorDeletes the locally opened sessions in the session cache which have timed-out and returns the ids for deleted sessions.- Specified by:
deleteExpiredLocalSessionsin interfaceCacheDelegator- Parameters:
collection- the session collection obj- Returns:
- the set of ids of sessions that are deleted
-
getModel
public AbstractHttpSessionModel getModel(String sId, AbstractHttpSessionCollection collection, boolean fLite) Description copied from interface:CacheDelegatorRetrieve a model from the cluster cache- Specified by:
getModelin interfaceCacheDelegator- Parameters:
sId- the session idcollection- the session collection objfLite- when set to true then if a near cache is used, the front map is avoided; thus avoiding listener registration and unnecessary eviction on the front map- Returns:
- the session model
-
getModel
Description copied from interface:CacheDelegatorRetrieve a model from the cluster cache- Specified by:
getModelin interfaceCacheDelegator- Parameters:
sId- the session idcollection- the session collection obj- Returns:
- the session model
-
optimisticModelUpdate
Description copied from interface:CacheDelegatorPerform an optimistic model update in the cache.- Specified by:
optimisticModelUpdatein interfaceCacheDelegator- Parameters:
model- the session mdoel
-
putModel
Description copied from interface:CacheDelegatorPut a session model in the cache.- Specified by:
putModelin interfaceCacheDelegator- Parameters:
model- the session model
-
updateModelTimestamp
Description copied from interface:CacheDelegatorUpdate a session model timestamp in the cache.- Specified by:
updateModelTimestampin interfaceCacheDelegator- Parameters:
model- the session model
-
flush
Description copied from interface:CacheDelegatorPerform a flush operation of the session onto the cluster cache- Specified by:
flushin interfaceCacheDelegator- Parameters:
collection- the session collection objmodel- the session model
-