Package com.mongodb

Class MongoCursorNotFoundException

All Implemented Interfaces:
Serializable

public class MongoCursorNotFoundException extends MongoQueryException
Subclass of MongoException representing a cursor-not-found exception.
Since:
2.12
  • Constructor Details

    • MongoCursorNotFoundException

      public MongoCursorNotFoundException(long cursorId, ServerAddress serverAddress)
      Construct a new instance.
      Parameters:
      cursorId - cursor identifier
      serverAddress - server address
  • Method Details

    • 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:
      getServerAddress in class MongoServerException
      Returns:
      the ServerAddress representing the server the cursor was on.