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 Details

    • deleteModel

      void deleteModel(AbstractHttpSessionCollection collection, AbstractHttpSessionModel model)
      Delete the session from the cluster cache.
      Parameters:
      collection - the collection obj
      model - the model obj
    • containsKey

      boolean containsKey(String sId, AbstractHttpSessionCollection collection)
      Check if the cluster cache contains a session obj.
      Parameters:
      sId - the session id
      collection - 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

      Retrieve a model from the cluster cache
      Parameters:
      sId - the session id
      collection - 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 id
      collection - the session collection obj
      fLite - 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

      Perform a flush operation of the session onto the cluster cache
      Parameters:
      collection - the session collection obj
      model - the session model