Package com.mongodb
Class ServerCursor
-
- com.mongodb.ServerCursor
-
- All Implemented Interfaces:
public final class ServerCursor extends implements
A class representing a cursor id associated with a server address (host/port) Since cursor ids are only useful in the context of a single MongoDB server process, you need both values to do a getMore on the cursor.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServerCursor(long id, ServerAddress address)
Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
o)
ServerAddress
getAddress()
Gets the server address.long
getId()
Gets the cursor id that the server uses to uniquely identify the cursor.int
hashCode()
toString()
-
-
-
Constructor Detail
-
ServerCursor
public ServerCursor(long id, ServerAddress address)
Construct an instance.- Parameters:
id
- the non-null cursor idaddress
- the non-null server address that has the cursor
-
-
Method Detail
-
getId
public long getId()
Gets the cursor id that the server uses to uniquely identify the cursor.- Returns:
- the cursor id
-
getAddress
public ServerAddress getAddress()
Gets the server address.- Returns:
- the server address
-
equals
public boolean equals( o)
- Overrides:
in class
-
hashCode
public int hashCode()
- Overrides:
in class
-
toString
public toString()
- Overrides:
in class
-
-