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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsKey(String sId, AbstractHttpSessionCollection collection)
Check if the cluster cache contains a session obj.Set<String>
deleteExpiredLocalSessions(AbstractHttpSessionCollection collection)
Deletes the locally opened sessions in the session cache which have timed-out and returns the ids for deleted sessions.Set<String>
deleteExpiredSessions(AbstractHttpSessionCollection collection)
Deletes the sessions in the session cache which have timed-out and returns the ids for deleted sessions.void
deleteModel(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
Delete the session from the cluster cache.void
flush(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
Perform a flush operation of the session onto the cluster cacheIterator
getIteratorForPotentiallyExpiredIds(AbstractHttpSessionCollection collection)
Retrieve an iterator of potentially expired session ids.Iterator
getIteratorForPotentiallyExpiredLocalIds(AbstractHttpSessionCollection collection)
Retrieve an iterator of potentially expired session ids from the list of local sessions.AbstractHttpSessionModel
getModel(String sId, AbstractHttpSessionCollection collection)
Retrieve a model from the cluster cacheAbstractHttpSessionModel
getModel(String sId, AbstractHttpSessionCollection collection, boolean fLite)
Retrieve a model from the cluster cachevoid
optimisticModelUpdate(AbstractHttpSessionModel model)
Perform an optimistic model update in the cache.void
putModel(AbstractHttpSessionModel model)
Put a session model in the cache.void
updateModelTimestamp(AbstractHttpSessionModel model)
Update a session model timestamp in the cache.
-
-
-
Method Detail
-
deleteModel
void deleteModel(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
Delete the session from the cluster cache.- Parameters:
collection
- the collection objmodel
- the model obj
-
containsKey
boolean containsKey(String sId, AbstractHttpSessionCollection collection)
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
Iterator getIteratorForPotentiallyExpiredIds(AbstractHttpSessionCollection collection)
Retrieve an iterator of potentially expired session ids.- Parameters:
collection
- the session collection obj- Returns:
- Iterator of potentially expired session ids
-
getIteratorForPotentiallyExpiredLocalIds
Iterator getIteratorForPotentiallyExpiredLocalIds(AbstractHttpSessionCollection collection)
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
Set<String> deleteExpiredSessions(AbstractHttpSessionCollection collection)
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
Set<String> deleteExpiredLocalSessions(AbstractHttpSessionCollection collection)
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
AbstractHttpSessionModel getModel(String sId, AbstractHttpSessionCollection collection)
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
void putModel(AbstractHttpSessionModel model)
Put a session model in the cache.- Parameters:
model
- the session model
-
updateModelTimestamp
void updateModelTimestamp(AbstractHttpSessionModel model)
Update a session model timestamp in the cache.- Parameters:
model
- the session model
-
optimisticModelUpdate
void optimisticModelUpdate(AbstractHttpSessionModel model)
Perform an optimistic model update in the cache.- Parameters:
model
- the session mdoel
-
flush
void flush(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
Perform a flush operation of the session onto the cluster cache- Parameters:
collection
- the session collection objmodel
- the session model
-
-