Class NoOpSessionContext

  • All Implemented Interfaces:
    SessionContext
    Direct Known Subclasses:
    ReadConcernAwareNoOpSessionContext

    @Deprecated(since="2021-05-27")
    public class NoOpSessionContext
    extends java.lang.Object
    implements SessionContext
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    A SessionContext implementation that does nothing and reports that it has no session.

    This class should not be considered a part of the public API.

    • Field Detail

      • INSTANCE

        public static final NoOpSessionContext INSTANCE
        Deprecated.
        A singleton instance of a NoOpSessionContext
    • Constructor Detail

      • NoOpSessionContext

        public NoOpSessionContext()
        Deprecated.
    • Method Detail

      • hasSession

        public boolean hasSession()
        Deprecated.
        Description copied from interface: SessionContext
        Returns true if there is a true server session associated with this context.
        Specified by:
        hasSession in interface SessionContext
        Returns:
        true if there is a true server session associated with this context.
      • isImplicitSession

        public boolean isImplicitSession()
        Deprecated.
        Description copied from interface: SessionContext
        Returns true if the session is implicit, and false if the application started the session explicity.
        Specified by:
        isImplicitSession in interface SessionContext
        Returns:
        true if the session is implicit
      • getSessionId

        public BsonDocument getSessionId()
        Deprecated.
        Description copied from interface: SessionContext
        Gets the session identifier if this context has a session backing it.
        Specified by:
        getSessionId in interface SessionContext
        Returns:
        the session id
      • isCausallyConsistent

        public boolean isCausallyConsistent()
        Deprecated.
        Description copied from interface: SessionContext
        Gets whether this context is associated with a causally consistent session.
        Specified by:
        isCausallyConsistent in interface SessionContext
        Returns:
        true ift his context is associated with a causally consistent session
      • getTransactionNumber

        public long getTransactionNumber()
        Deprecated.
        Description copied from interface: SessionContext
        Gets the current transaction number.
        Specified by:
        getTransactionNumber in interface SessionContext
        Returns:
        the current transaction number
      • advanceTransactionNumber

        public long advanceTransactionNumber()
        Deprecated.
        Description copied from interface: SessionContext
        Advance the transaction number.
        Specified by:
        advanceTransactionNumber in interface SessionContext
        Returns:
        the next transaction number for the session
      • notifyMessageSent

        public boolean notifyMessageSent()
        Deprecated.
        Description copied from interface: SessionContext
        Notify the session context that a message has been sent.
        Specified by:
        notifyMessageSent in interface SessionContext
        Returns:
        true if this is the first message sent, false otherwise
      • getOperationTime

        public BsonTimestamp getOperationTime()
        Deprecated.
        Description copied from interface: SessionContext
        Gets the current operation time for this session context
        Specified by:
        getOperationTime in interface SessionContext
        Returns:
        the current operation time, which may be null
      • advanceOperationTime

        public void advanceOperationTime​(BsonTimestamp operationTime)
        Deprecated.
        Description copied from interface: SessionContext
        Advance the operation time. If the current operation time is greater than the given operation time, this method has no effect.
        Specified by:
        advanceOperationTime in interface SessionContext
        Parameters:
        operationTime - the new operation time time
      • getClusterTime

        public BsonDocument getClusterTime()
        Deprecated.
        Description copied from interface: SessionContext
        Gets the current cluster time for this session context.
        Specified by:
        getClusterTime in interface SessionContext
        Returns:
        the cluster time, which may be null
      • advanceClusterTime

        public void advanceClusterTime​(BsonDocument clusterTime)
        Deprecated.
        Description copied from interface: SessionContext
        Advance the cluster time. If the current cluster time is greater than the given cluster time, this method has no effect.
        Specified by:
        advanceClusterTime in interface SessionContext
        Parameters:
        clusterTime - the new cluster time
      • hasActiveTransaction

        public boolean hasActiveTransaction()
        Deprecated.
        Description copied from interface: SessionContext
        Gets whether the session has an active transaction
        Specified by:
        hasActiveTransaction in interface SessionContext
        Returns:
        true if the session has an active transaction
      • getReadConcern

        public ReadConcern getReadConcern()
        Deprecated.
        Description copied from interface: SessionContext
        Gets the read concern to apply to operations on this binding.
        Specified by:
        getReadConcern in interface SessionContext
        Returns:
        the read concern to apply to operations on this binding
      • setRecoveryToken

        public void setRecoveryToken​(BsonDocument recoveryToken)
        Deprecated.
        Description copied from interface: SessionContext
        Sets the recovery token in the session.
        Specified by:
        setRecoveryToken in interface SessionContext
        Parameters:
        recoveryToken - the recovery token
      • markSessionDirty

        public void markSessionDirty()
        Deprecated.
        Description copied from interface: SessionContext
        Mark the session as dirty. This happens when a command fails with a network error. Dirty sessions are later discarded from the server session pool.
        Specified by:
        markSessionDirty in interface SessionContext
      • isSessionMarkedDirty

        public boolean isSessionMarkedDirty()
        Deprecated.
        Description copied from interface: SessionContext
        Whether the server session is marked dirty.
        Specified by:
        isSessionMarkedDirty in interface SessionContext
        Returns:
        true if the session has been marked dirty