Package com.mongodb.session
Interface ServerSession
-
public interface ServerSession
A MongoDB server session.- Since:
- 3.6
- Since server release
- 3.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
advanceTransactionNumber()
Return the next available transaction number.BsonDocument
getIdentifier()
long
getTransactionNumber()
Gets the current transaction number.boolean
isClosed()
Whether the server session is closed.
-
-
-
Method Detail
-
getIdentifier
BsonDocument getIdentifier()
- Returns:
- the server session identifier
-
getTransactionNumber
long getTransactionNumber()
Gets the current transaction number.- Returns:
- the current transaction number
- Since:
- 3.8
-
advanceTransactionNumber
long advanceTransactionNumber()
Return the next available transaction number.- Returns:
- the next transaction number
-
isClosed
boolean isClosed()
Whether the server session is closed.- Returns:
- true if the session has been closed
-
-