Package com.mongodb
Class MongoCursorNotFoundException
- java.lang.Object
 - 
- java.lang.Throwable
 - 
- java.lang.Exception
 - 
- java.lang.RuntimeException
 - 
- com.mongodb.MongoException
 - 
- com.mongodb.MongoServerException
 - 
- com.mongodb.MongoQueryException
 - 
- com.mongodb.MongoCursorNotFoundException
 
 
 
 
 
 
 
 
- 
- All Implemented Interfaces:
 Serializable
public class MongoCursorNotFoundException extends MongoQueryException
Subclass ofMongoExceptionrepresenting a cursor-not-found exception.- Since:
 - 2.12
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
- 
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL 
 - 
 
- 
Constructor Summary
Constructors Constructor Description MongoCursorNotFoundException(long cursorId, ServerAddress serverAddress)Construct a new instance. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCursorId()Get the cursor id that wasn't found.ServerAddressgetServerAddress()The server address where the cursor is.- 
Methods inherited from class com.mongodb.MongoQueryException
getErrorCode, getErrorMessage 
- 
Methods inherited from class com.mongodb.MongoException
addLabel, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel 
- 
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
MongoCursorNotFoundException
public MongoCursorNotFoundException(long cursorId, ServerAddress serverAddress)Construct a new instance.- Parameters:
 cursorId- cursor identifierserverAddress- server address
 
 - 
 
- 
Method Detail
- 
getCursorId
public long getCursorId()
Get the cursor id that wasn't found.- Returns:
 - the ID of the cursor
 
 
- 
getServerAddress
public ServerAddress getServerAddress()
The server address where the cursor is.- Overrides:
 getServerAddressin classMongoServerException- Returns:
 - the ServerAddress representing the server the cursor was on.
 
 
 - 
 
 -