Class DetachedSessionMetaData<C,B extends Batch>

java.lang.Object
org.wildfly.clustering.session.cache.metadata.DetachedSessionMetaData<C,B>
Type Parameters:
C - the session context type
B - the batch type
All Implemented Interfaces:
Expiration, ExpirationMetaData, ImmutableSessionMetaData, SessionMetaData

public class DetachedSessionMetaData<C,B extends Batch> extends Object implements SessionMetaData
SessionMetaData implementation for detached sessions.
Author:
Paul Ferraro
  • Constructor Details

  • Method Details

    • isNew

      public boolean isNew()
      Description copied from interface: ImmutableSessionMetaData
      Indicates whether or not this session was created by the current thread.
      Specified by:
      isNew in interface ImmutableSessionMetaData
      Returns:
      true, if this session is new, false otherwise
    • isExpired

      public boolean isExpired()
      Description copied from interface: ExpirationMetaData
      Indicates whether or not this object is expired.
      Specified by:
      isExpired in interface ExpirationMetaData
      Returns:
      true, if this object has expired, false otherwise.
    • getCreationTime

      public Instant getCreationTime()
      Description copied from interface: ImmutableSessionMetaData
      Returns the time this session was created.
      Specified by:
      getCreationTime in interface ImmutableSessionMetaData
      Returns:
      the time this session was created
    • getLastAccessStartTime

      public Instant getLastAccessStartTime()
      Description copied from interface: ImmutableSessionMetaData
      Returns the start time of the last request to access this session, or null if session was created during the current request.
      Specified by:
      getLastAccessStartTime in interface ImmutableSessionMetaData
      Returns:
      the start time of the last request to access this session, or null if session was created during the current request.
    • getLastAccessEndTime

      public Instant getLastAccessEndTime()
      Description copied from interface: ImmutableSessionMetaData
      Returns the end time of the last request to access this session, or null if session was created during the current request.
      Specified by:
      getLastAccessEndTime in interface ImmutableSessionMetaData
      Returns:
      the end time of the last request to access this session, or null if session was created during the current request.
    • getTimeout

      public Duration getTimeout()
      Description copied from interface: Expiration
      The duration of time, after which an idle object should expire.
      Specified by:
      getTimeout in interface Expiration
      Returns:
      the object timeout
    • setTimeout

      public void setTimeout(Duration duration)
      Description copied from interface: SessionMetaData
      Set the time interval as a duration, after which this session will expire.
      Specified by:
      setTimeout in interface SessionMetaData
      Parameters:
      duration - a timeout duration
    • setLastAccess

      public void setLastAccess(Instant startTime, Instant endTime)
      Description copied from interface: SessionMetaData
      Sets the time this session was last accessed.
      Specified by:
      setLastAccess in interface SessionMetaData
      Parameters:
      startTime - the start time of the last request
      endTime - the end time of the last request