public class BatchedWriteCallback extends ReplyLongCallback
DEFAULT_NAMEERROR_CODE_FIELD, ERROR_MESSAGE_FIELDS| Constructor and Description |
|---|
BatchedWriteCallback(String databaseName,
String collectionName,
Callback<Long> results,
BatchedWrite write,
Client client,
List<BatchedWrite.Bundle> bundles)
Creates a new BatchedWriteCallback.
|
BatchedWriteCallback(String databaseName,
String collectionName,
List<Callback<Reply>> realCallbacks,
BatchedWrite write,
List<BatchedWrite.Bundle> bundles)
Creates a new BatchedWriteCallback.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
callback(BatchedWrite.Bundle bundle,
Reply result)
Callback for a bundle of write operations sent via the write commands.
|
protected void |
exception(BatchedWrite.Bundle bundle,
Throwable thrown)
Callback for a bundle of write operations sent via the write commands has
failed.
|
void |
send()
Sends the next set of operations to the server.
|
void |
setClient(Client client)
Sets the client to use to send the bundled writes.
|
asError, convert, toLongexception, getForwardCallback, handle, isLightWeightasError, asError, asError, asString, callback, checkForError, toInt, verifypublic BatchedWriteCallback(String databaseName, String collectionName, Callback<Long> results, BatchedWrite write, Client client, List<BatchedWrite.Bundle> bundles)
databaseName - The name of the database.collectionName - The name of the collection.results - The callback for the final results.write - The original write.client - The client for sending the bundled write commands.bundles - The bundled writes.public BatchedWriteCallback(String databaseName, String collectionName, List<Callback<Reply>> realCallbacks, BatchedWrite write, List<BatchedWrite.Bundle> bundles)
databaseName - The name of the database.collectionName - The name of the collection.realCallbacks - The list of callbacks. One for each write.write - The original write.bundles - The bundled writes.public void send()
public void setClient(Client client)
client - The new client for the batch.protected void callback(BatchedWrite.Bundle bundle, Reply result)
bundle - The bundle of write operations.result - The result of the write operations.protected void exception(BatchedWrite.Bundle bundle, Throwable thrown)
bundle - The bundle of write operations.thrown - The error for the operations.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.