class CommandProtocolImpl<T> extends java.lang.Object implements CommandProtocol<T>
Modifier and Type | Field and Description |
---|---|
private ClusterConnectionMode |
clusterConnectionMode |
private BsonDocument |
command |
private FieldNameValidator |
commandFieldNameValidator |
private Decoder<T> |
commandResultDecoder |
static Logger |
LOGGER |
private MongoNamespace |
namespace |
private SplittablePayload |
payload |
private FieldNameValidator |
payloadFieldNameValidator |
private ReadPreference |
readPreference |
private boolean |
responseExpected |
private SessionContext |
sessionContext |
Constructor and Description |
---|
CommandProtocolImpl(java.lang.String database,
BsonDocument command,
FieldNameValidator commandFieldNameValidator,
ReadPreference readPreference,
Decoder<T> commandResultDecoder) |
CommandProtocolImpl(java.lang.String database,
BsonDocument command,
FieldNameValidator commandFieldNameValidator,
ReadPreference readPreference,
Decoder<T> commandResultDecoder,
boolean responseExpected,
SplittablePayload payload,
FieldNameValidator payloadFieldNameValidator,
ClusterConnectionMode clusterConnectionMode) |
Modifier and Type | Method and Description |
---|---|
T |
execute(InternalConnection connection) |
void |
executeAsync(InternalConnection connection,
SingleResultCallback<T> callback) |
private CommandMessage |
getCommandMessage(InternalConnection connection) |
private java.lang.String |
getCommandName() |
CommandProtocolImpl<T> |
sessionContext(SessionContext sessionContext) |
public static final Logger LOGGER
private final MongoNamespace namespace
private final BsonDocument command
private final SplittablePayload payload
private final ReadPreference readPreference
private final FieldNameValidator commandFieldNameValidator
private final FieldNameValidator payloadFieldNameValidator
private final boolean responseExpected
private final ClusterConnectionMode clusterConnectionMode
private SessionContext sessionContext
CommandProtocolImpl(java.lang.String database, BsonDocument command, FieldNameValidator commandFieldNameValidator, ReadPreference readPreference, Decoder<T> commandResultDecoder)
CommandProtocolImpl(java.lang.String database, BsonDocument command, FieldNameValidator commandFieldNameValidator, ReadPreference readPreference, Decoder<T> commandResultDecoder, boolean responseExpected, SplittablePayload payload, FieldNameValidator payloadFieldNameValidator, ClusterConnectionMode clusterConnectionMode)
public T execute(InternalConnection connection)
execute
in interface CommandProtocol<T>
public void executeAsync(InternalConnection connection, SingleResultCallback<T> callback)
executeAsync
in interface CommandProtocol<T>
public CommandProtocolImpl<T> sessionContext(SessionContext sessionContext)
sessionContext
in interface CommandProtocol<T>
private CommandMessage getCommandMessage(InternalConnection connection)
private java.lang.String getCommandName()