Class ClientSessionContext

  • All Implemented Interfaces:
    SessionContext

    @Deprecated(since="2021-05-27")
    public abstract class ClientSessionContext
    extends java.lang.Object
    implements SessionContext
    Deprecated.
    • Constructor Detail

      • ClientSessionContext

        public ClientSessionContext​(ClientSession clientSession)
        Deprecated.
    • Method Detail

      • getClientSession

        public ClientSession getClientSession()
        Deprecated.
      • 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.
      • 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
      • 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
      • 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