public class BatchedNativeWriteCallback extends ReplyLongCallback
DEFAULT_NAME
ERROR_CODE_FIELD, ERROR_MESSAGE_FIELDS
Constructor and Description |
---|
BatchedNativeWriteCallback(Callback<Long> results,
BatchedWrite write,
AbstractMongoOperations collection,
List<WriteOperation> operations)
Creates a new BatchedWriteCallback.
|
Modifier and Type | Method and Description |
---|---|
protected void |
callback(WriteOperation operation,
long result)
Callback for a single write operation sent via the native messages.
|
protected void |
exception(WriteOperation operation,
Throwable thrown)
Callback for a single write operation sent via the native messages has
failed.
|
void |
send()
Sends the next set of operations to the server.
|
asError, convert, toLong
exception, getForwardCallback, handle, isLightWeight
asError, asError, asError, asString, callback, checkForError, toInt, verify
public BatchedNativeWriteCallback(Callback<Long> results, BatchedWrite write, AbstractMongoOperations collection, List<WriteOperation> operations)
results
- The callback for the final results.write
- The original write.collection
- The collection for sending the operations.operations
- The operations to send.public void send()
protected void callback(WriteOperation operation, long result)
operation
- The write operation.result
- The result of the write operation.protected void exception(WriteOperation operation, Throwable thrown)
operation
- The write operation.thrown
- The error for the operation.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.