public class KillCursors extends AbstractMessage
struct {
MsgHeader header; // standard message header
int32 ZERO; // 0 - reserved for future use
int32 numberOfCursorIDs; // number of cursorIDs in message
int64* cursorIDs; // sequence of cursorIDs to close
}
HEADER_SIZE, myCollectionName, myDatabaseName| Constructor and Description |
|---|
KillCursors(BsonInputStream in)
Creates a new KillCursors.
|
KillCursors(long[] cursorIds,
ReadPreference readPreference)
Creates a new KillCursors.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Determines if the passed object is of this same type as this object and
if so that its fields are equal.
|
long[] |
getCursorIds()
Returns the ids of the cursors to be killed.
|
int |
hashCode()
Computes a reasonable hash code.
|
void |
write(int messageId,
BsonOutputStream out)
Writes the message from the stream.
|
getCollectionName, getDatabaseName, getReadPreference, init, writeHeaderpublic KillCursors(BsonInputStream in) throws IOException
in - The stream to read the kill_cursors message from.IOException - On a failure reading the kill_cursors message.public KillCursors(long[] cursorIds,
ReadPreference readPreference)
cursorIds - The ids of the cursors to kill.readPreference - The preferences for which server to send the request.public boolean equals(Object object)
equals in class AbstractMessageobject - The object to compare to.Object.equals(java.lang.Object)public long[] getCursorIds()
public int hashCode()
hashCode in class AbstractMessagepublic void write(int messageId,
BsonOutputStream out)
throws IOException
Overridden to write the kill_cursors message.
messageId - The id to be assigned to the message.out - The sink for data written.IOException - On an error writing to the stream.Message.write(int, BsonOutputStream)Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.