| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
COMMAND_NAME |
private CommandListener |
commandListener |
private java.util.List<java.lang.Long> |
cursors |
static Logger |
LOGGER |
private MongoNamespace |
namespace |
| Constructor and Description |
|---|
KillCursorProtocol(MongoNamespace namespace,
java.util.List<java.lang.Long> cursors)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
private BsonDocument |
asCommandDocument() |
private BsonDocument |
asCommandResponseDocument() |
java.lang.Void |
execute(InternalConnection connection)
Execute the protocol.
|
void |
executeAsync(InternalConnection connection,
SingleResultCallback<java.lang.Void> callback)
Execute the protocol asynchronously.
|
private java.lang.String |
getCursorIdListAsString() |
void |
setCommandListener(CommandListener commandListener) |
public static final Logger LOGGER
private static final java.lang.String COMMAND_NAME
private final MongoNamespace namespace
private final java.util.List<java.lang.Long> cursors
private CommandListener commandListener
public KillCursorProtocol(MongoNamespace namespace, java.util.List<java.lang.Long> cursors)
namespace - the namespace in which all the cursors livecursors - the list of cursors to killpublic java.lang.Void execute(InternalConnection connection)
Protocolpublic void executeAsync(InternalConnection connection, SingleResultCallback<java.lang.Void> callback)
ProtocolexecuteAsync in interface Protocol<java.lang.Void>connection - the connection to execute the protocol oncallback - the callback that is passed the result of the executionpublic void setCommandListener(CommandListener commandListener)
setCommandListener in interface Protocol<java.lang.Void>private BsonDocument asCommandDocument()
private BsonDocument asCommandResponseDocument()
private java.lang.String getCursorIdListAsString()