abstract class BaseWriteCommandMessage extends RequestMessage
RequestMessage.OpCode| Modifier and Type | Field and Description |
|---|---|
private java.lang.Boolean |
bypassDocumentValidation |
private DBEncoder |
commandEncoder |
private static int |
HEADROOM |
private WriteConcern |
writeConcern |
private MongoNamespace |
writeNamespace |
REQUEST_ID| Constructor and Description |
|---|
BaseWriteCommandMessage(MongoNamespace writeNamespace,
WriteConcern writeConcern,
java.lang.Boolean bypassDocumentValidation,
DBEncoder commandEncoder,
MessageSettings settings) |
| Modifier and Type | Method and Description |
|---|---|
BaseWriteCommandMessage |
encode(OutputBuffer buffer) |
protected BaseWriteCommandMessage |
encodeMessageBody(OutputBuffer buffer,
int messageStartPosition) |
private boolean |
exceedsBatchItemCountLimit(int batchItemCount) |
private boolean |
exceedsBatchLengthLimit(int batchLength,
int batchItemCount) |
protected boolean |
exceedsLimits(int batchLength,
int batchItemCount) |
protected java.lang.Boolean |
getBypassDocumentValidation() |
DBEncoder |
getCommandEncoder() |
protected abstract java.lang.String |
getCommandName() |
abstract int |
getItemCount() |
WriteConcern |
getWriteConcern() |
MongoNamespace |
getWriteNamespace() |
private void |
writeCommandHeader(OutputBuffer buffer) |
private void |
writeCommandPrologue(BSONBinaryWriter writer) |
protected abstract BaseWriteCommandMessage |
writeTheWrites(OutputBuffer buffer,
int commandStartPosition,
BSONBinaryWriter writer) |
backpatchMessageLength, getCollectionName, getId, getNamespace, getOpCode, getSettings, writeMessagePrologueprivate static final int HEADROOM
private final MongoNamespace writeNamespace
private final WriteConcern writeConcern
private final java.lang.Boolean bypassDocumentValidation
private final DBEncoder commandEncoder
public BaseWriteCommandMessage(MongoNamespace writeNamespace, WriteConcern writeConcern, java.lang.Boolean bypassDocumentValidation, DBEncoder commandEncoder, MessageSettings settings)
public MongoNamespace getWriteNamespace()
public WriteConcern getWriteConcern()
public DBEncoder getCommandEncoder()
public BaseWriteCommandMessage encode(OutputBuffer buffer)
encode in class RequestMessageprotected BaseWriteCommandMessage encodeMessageBody(OutputBuffer buffer, int messageStartPosition)
encodeMessageBody in class RequestMessageprivate void writeCommandHeader(OutputBuffer buffer)
protected abstract java.lang.String getCommandName()
protected java.lang.Boolean getBypassDocumentValidation()
protected abstract BaseWriteCommandMessage writeTheWrites(OutputBuffer buffer, int commandStartPosition, BSONBinaryWriter writer)
protected boolean exceedsLimits(int batchLength,
int batchItemCount)
private boolean exceedsBatchLengthLimit(int batchLength,
int batchItemCount)
private boolean exceedsBatchItemCountLimit(int batchItemCount)
public abstract int getItemCount()
private void writeCommandPrologue(BSONBinaryWriter writer)