Package com.mongodb

Class ClientSessionOptions


  • @Immutable
    public final class ClientSessionOptions
    extends 
    The options to apply to a ClientSession.
    Since:
    3.6
    See Also:
    ClientSession
    MongoDB documentation
    Since server release
    • Method Detail

      • isCausallyConsistent

        @Nullable
        public  isCausallyConsistent()
        Whether operations using the session should causally consistent with each other.
        Returns:
        whether operations using the session should be causally consistent. A null value indicates to use the global default, which is currently true.
        MongoDB documentation
      • getDefaultTransactionOptions

        public TransactionOptions getDefaultTransactionOptions()
        Gets the default transaction options for the session.
        Returns:
        the default transaction options for the session
        Since:
        3.8
        Since server release
      • equals

        public boolean equals​( o)
        Overrides:
         in class 
      • hashCode

        public int hashCode()
        Overrides:
         in class 
      • toString

        public  toString()
        Overrides:
         in class 
      • builder

        public static ClientSessionOptions.Builder builder​(ClientSessionOptions options)
        Gets an instance of a builder initialized with the given options
        Parameters:
        options - the options with which to initialize the builder
        Returns:
        a builder instance
        Since:
        3.8