T
- the type of document to decode query results toclass GetMoreProtocol<T> extends java.lang.Object implements Protocol<QueryResult<T>>
Modifier and Type | Class and Description |
---|---|
(package private) class |
GetMoreProtocol.GetMoreResultCallback |
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
COMMAND_NAME |
private CommandListener |
commandListener |
private long |
cursorId |
static Logger |
LOGGER |
private MongoNamespace |
namespace |
private int |
numberToReturn |
private Decoder<T> |
resultDecoder |
Constructor and Description |
---|
GetMoreProtocol(MongoNamespace namespace,
long cursorId,
int numberToReturn,
Decoder<T> resultDecoder) |
Modifier and Type | Method and Description |
---|---|
private BsonDocument |
asGetMoreCommandDocument() |
private BsonDocument |
asGetMoreCommandResponseDocument(QueryResult<T> queryResult,
ResponseBuffers responseBuffers) |
QueryResult<T> |
execute(InternalConnection connection)
Execute the protocol.
|
void |
executeAsync(InternalConnection connection,
SingleResultCallback<QueryResult<T>> callback)
Execute the protocol asynchronously.
|
private void |
sendMessage(GetMoreMessage message,
InternalConnection connection) |
void |
setCommandListener(CommandListener commandListener) |
public static final Logger LOGGER
private static final java.lang.String COMMAND_NAME
private final MongoNamespace namespace
private final long cursorId
private final int numberToReturn
private CommandListener commandListener
GetMoreProtocol(MongoNamespace namespace, long cursorId, int numberToReturn, Decoder<T> resultDecoder)
public QueryResult<T> execute(InternalConnection connection)
Protocol
execute
in interface Protocol<QueryResult<T>>
connection
- the connection to execute the protocol onpublic void executeAsync(InternalConnection connection, SingleResultCallback<QueryResult<T>> callback)
Protocol
executeAsync
in interface Protocol<QueryResult<T>>
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<QueryResult<T>>
private void sendMessage(GetMoreMessage message, InternalConnection connection)
private BsonDocument asGetMoreCommandDocument()
private BsonDocument asGetMoreCommandResponseDocument(QueryResult<T> queryResult, ResponseBuffers responseBuffers)