Package com.tangosol.coherence.servlet
Interface CacheDelegator
- All Known Implementing Classes:
DefaultCacheDelegator,LocalSessionCacheDelegator,SessionLocalBackingMapCacheDelegator
public interface CacheDelegator
An interface for a class that will perform all cluster cache related
operations
- Version:
- Coherence 3.7.1
- Author:
- jk 2011.05.26
-
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.
-
Method Details
-
deleteModel
Delete the session from the cluster cache.- Parameters:
collection- the collection objmodel- the model obj
-
containsKey
Check if the cluster cache contains a session obj.- Parameters:
sId- the session idcollection- the session collection obj- Returns:
- true, if the session obj exists in the cluster cache
-
getIteratorForPotentiallyExpiredIds
Retrieve an iterator of potentially expired session ids.- Parameters:
collection- the session collection obj- Returns:
- Iterator of potentially expired session ids
-
getIteratorForPotentiallyExpiredLocalIds
Retrieve an iterator of potentially expired session ids from the list of local sessions.- Parameters:
collection- the session collection obj- Returns:
- iterator of potentially expired session local session ids
-
deleteExpiredSessions
Deletes the sessions in the session cache which have timed-out and returns the ids for deleted sessions.- Parameters:
collection- the session collection obj- Returns:
- the set of ids of sessions that are deleted
-
deleteExpiredLocalSessions
Deletes the locally opened sessions in the session cache which have timed-out and returns the ids for deleted sessions.- Parameters:
collection- the session collection obj- Returns:
- the set of ids of sessions that are deleted
-
getModel
Retrieve a model from the cluster cache- Parameters:
sId- the session idcollection- the session collection obj- Returns:
- the session model
-
getModel
AbstractHttpSessionModel getModel(String sId, AbstractHttpSessionCollection collection, boolean fLite) Retrieve a model from the cluster cache- 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
- Since:
- 12.1.3.0.7
-
putModel
Put a session model in the cache.- Parameters:
model- the session model
-
updateModelTimestamp
Update a session model timestamp in the cache.- Parameters:
model- the session model
-
optimisticModelUpdate
Perform an optimistic model update in the cache.- Parameters:
model- the session mdoel
-
flush
Perform a flush operation of the session onto the cluster cache- Parameters:
collection- the session collection objmodel- the session model
-