public class GetLastError extends Query
This is a helper class for retrieving the results of Delete
,
Insert
, and Update
commands. Get last error is not a part of
the standard wire protocol but is provided here due to the frequency of
usage.
AWAIT_DATA_FLAG_BIT, DEFAULT_BATCH_SIZE, EXHAUST_FLAG_BIT, NO_CURSOR_TIMEOUT_FLAG_BIT, OPLOG_REPLAY_FLAG_BIT, PARTIAL_FLAG_BIT, REPLICA_OK_FLAG_BIT, TAILABLE_CURSOR_FLAG_BIT
HEADER_SIZE, myCollectionName, myDatabaseName
Constructor and Description |
---|
GetLastError(String dbName,
boolean fsync,
boolean waitForJournal,
int w,
int wtimeout)
Create a new GetLastError.
|
GetLastError(String dbName,
Durability durability)
Create a new GetLastError.
|
equals, getBatchSize, getLimit, getNumberToReturn, getNumberToSkip, getQuery, getReturnFields, hashCode, isAwaitData, isBatchSizeSet, isExhaust, isLimitSet, isNoCursorTimeout, isPartial, isTailable, validateSize, write
getCollectionName, getDatabaseName, getReadPreference, init, writeHeader
public GetLastError(String dbName, boolean fsync, boolean waitForJournal, int w, int wtimeout)
dbName
- The name of the database.fsync
- If true the command waits for an fsync of the data to have
completed.waitForJournal
- If true the command waits for the preceding command to have
been written to the journal.w
- The replication factor to wait for.wtimeout
- The amount of time (in milliseconds) to wait for the write to
finish.public GetLastError(String dbName, Durability durability)
dbName
- The name of the database.durability
- The Durability requested.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.