Package com.tangosol.coherence.servlet
Class DefaultCacheDelegator
- java.lang.Object
-
- com.tangosol.coherence.servlet.DefaultCacheDelegator
-
- All Implemented Interfaces:
CacheDelegator
- Direct Known Subclasses:
LocalSessionCacheDelegator
public class DefaultCacheDelegator extends Object implements CacheDelegator
-
-
Constructor Summary
Constructors Constructor Description DefaultCacheDelegator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(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.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 cacheIteratorgetIteratorForPotentiallyExpiredIds(AbstractHttpSessionCollection collection)Retrieve an iterator of potentially expired session ids.IteratorgetIteratorForPotentiallyExpiredLocalIds(AbstractHttpSessionCollection collection)Retrieve an iterator of potentially expired session ids from the list of local sessions.AbstractHttpSessionModelgetModel(String sId, AbstractHttpSessionCollection collection)Retrieve a model from the cluster cacheAbstractHttpSessionModelgetModel(String sId, AbstractHttpSessionCollection collection, boolean fLite)Retrieve a model from the cluster cachevoidoptimisticModelUpdate(AbstractHttpSessionModel model)Perform an optimistic model update in the cache.voidputModel(AbstractHttpSessionModel model)Put a session model in the cache.voidupdateModelTimestamp(AbstractHttpSessionModel model)Update a session model timestamp in the cache.
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
The Logger object.
-
-
Method Detail
-
deleteModel
public void deleteModel(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
Description copied from interface:CacheDelegatorDelete the session from the cluster cache.- Specified by:
deleteModelin interfaceCacheDelegator- Parameters:
collection- the collection objmodel- the model obj
-
containsKey
public boolean containsKey(String sId, AbstractHttpSessionCollection collection)
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
public Iterator getIteratorForPotentiallyExpiredIds(AbstractHttpSessionCollection collection)
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
public Iterator getIteratorForPotentiallyExpiredLocalIds(AbstractHttpSessionCollection collection)
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
public Set<String> deleteExpiredSessions(AbstractHttpSessionCollection collection)
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
public Set<String> deleteExpiredLocalSessions(AbstractHttpSessionCollection collection)
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
public AbstractHttpSessionModel getModel(String sId, AbstractHttpSessionCollection collection)
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
public void optimisticModelUpdate(AbstractHttpSessionModel model)
Description copied from interface:CacheDelegatorPerform an optimistic model update in the cache.- Specified by:
optimisticModelUpdatein interfaceCacheDelegator- Parameters:
model- the session mdoel
-
putModel
public void putModel(AbstractHttpSessionModel model)
Description copied from interface:CacheDelegatorPut a session model in the cache.- Specified by:
putModelin interfaceCacheDelegator- Parameters:
model- the session model
-
updateModelTimestamp
public void updateModelTimestamp(AbstractHttpSessionModel model)
Description copied from interface:CacheDelegatorUpdate a session model timestamp in the cache.- Specified by:
updateModelTimestampin interfaceCacheDelegator- Parameters:
model- the session model
-
flush
public void flush(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
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
-
-