Class BaseClientSessionImpl

  • All Implemented Interfaces:
    ClientSession, java.io.Closeable, java.lang.AutoCloseable

    @Deprecated(since="2021-05-27")
    public class BaseClientSessionImpl
    extends java.lang.Object
    implements ClientSession
    Deprecated.
    • Method Detail

      • getPinnedServerAddress

        @Nullable
        public ServerAddress getPinnedServerAddress()
        Deprecated.
        Description copied from interface: ClientSession
        Get the server address of the pinned mongos on this session. For internal use only.
        Specified by:
        getPinnedServerAddress in interface ClientSession
        Returns:
        the server address of the pinned mongos
      • setPinnedServerAddress

        public void setPinnedServerAddress​(@Nullable
                                           ServerAddress address)
        Deprecated.
        Description copied from interface: ClientSession
        Set the server address of the pinned mongos. For internal use only.
        Specified by:
        setPinnedServerAddress in interface ClientSession
        Parameters:
        address - the server address to pin
      • getRecoveryToken

        public BsonDocument getRecoveryToken()
        Deprecated.
        Description copied from interface: ClientSession
        Get the recovery token from the latest outcome in a sharded transaction. For internal use only.
        Specified by:
        getRecoveryToken in interface ClientSession
        Returns:
        the recovery token
      • setRecoveryToken

        public void setRecoveryToken​(BsonDocument recoveryToken)
        Deprecated.
        Description copied from interface: ClientSession
        Set the recovery token. For internal use only.
        Specified by:
        setRecoveryToken in interface ClientSession
        Parameters:
        recoveryToken - the recovery token
      • isCausallyConsistent

        public boolean isCausallyConsistent()
        Deprecated.
        Description copied from interface: ClientSession
        Returns true if operations in this session must be causally consistent
        Specified by:
        isCausallyConsistent in interface ClientSession
        Returns:
        whether operations in this session must be causally consistent.
      • getOriginator

        public java.lang.Object getOriginator()
        Deprecated.
        Description copied from interface: ClientSession
        Gets the originator for the session.

        Important because sessions must only be used by their own originator.

        Specified by:
        getOriginator in interface ClientSession
        Returns:
        the sessions originator
      • getOperationTime

        public BsonTimestamp getOperationTime()
        Deprecated.
        Description copied from interface: ClientSession
        Gets the operation time of the last operation executed in this session.
        Specified by:
        getOperationTime in interface ClientSession
        Returns:
        the operation time
      • advanceOperationTime

        public void advanceOperationTime​(BsonTimestamp newOperationTime)
        Deprecated.
        Description copied from interface: ClientSession
        Set the operation time of the last operation executed in this session.
        Specified by:
        advanceOperationTime in interface ClientSession
        Parameters:
        newOperationTime - the operation time
      • advanceClusterTime

        public void advanceClusterTime​(BsonDocument newClusterTime)
        Deprecated.
        Specified by:
        advanceClusterTime in interface ClientSession
        Parameters:
        newClusterTime - the cluster time to advance to
      • close

        public void close()
        Deprecated.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface ClientSession
        Specified by:
        close in interface java.io.Closeable