final class CommandOperationHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
CommandOperationHelper.CommandCreator |
private static class |
CommandOperationHelper.CommandProtocolExecutingCallback<D,R> |
(package private) static interface |
CommandOperationHelper.CommandTransformer<T,R> |
(package private) static class |
CommandOperationHelper.IdentityTransformer<T> |
(package private) static class |
CommandOperationHelper.TransformingResultCallback<T,R> |
Modifier | Constructor and Description |
---|---|
private |
CommandOperationHelper() |
Modifier and Type | Method and Description |
---|---|
private static <T,R> SingleResultCallback<T> |
createCommandCallback(AsyncWriteBinding binding,
AsyncConnectionSource oldSource,
AsyncConnection oldConnection,
java.lang.String database,
ReadPreference readPreference,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<T> commandResultDecoder,
CommandOperationHelper.CommandTransformer<T,R> transformer,
SingleResultCallback<R> callback) |
(package private) static <T,R> void |
executeRetryableCommand(AsyncWriteBinding binding,
java.lang.String database,
ReadPreference readPreference,
FieldNameValidator fieldNameValidator,
Decoder<T> commandResultDecoder,
CommandOperationHelper.CommandCreator commandCreator,
CommandOperationHelper.CommandTransformer<T,R> transformer,
SingleResultCallback<R> originalCallback) |
(package private) static <T,R> R |
executeRetryableCommand(WriteBinding binding,
java.lang.String database,
ReadPreference readPreference,
FieldNameValidator fieldNameValidator,
Decoder<T> commandResultDecoder,
CommandOperationHelper.CommandCreator commandCreator,
CommandOperationHelper.CommandTransformer<T,R> transformer) |
(package private) static BsonDocument |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command) |
(package private) static <T> T |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static BsonDocument |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command,
Connection connection) |
(package private) static <T> T |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command,
Connection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static <T> T |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<BsonDocument> decoder,
Connection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static <D,T> T |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<D> decoder,
CommandOperationHelper.CommandTransformer<D,T> transformer) |
(package private) static <T> T |
executeWrappedCommandProtocol(ReadBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<T> decoder) |
private static <D,T> T |
executeWrappedCommandProtocol(java.lang.String database,
BsonDocument command,
Decoder<D> decoder,
Connection connection,
ReadPreference readPreference,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SessionContext sessionContext) |
private static <T> T |
executeWrappedCommandProtocol(java.lang.String database,
BsonDocument command,
Decoder<T> decoder,
Connection connection,
ReadPreference readPreference,
SessionContext sessionContext) |
private static <T> T |
executeWrappedCommandProtocol(java.lang.String database,
BsonDocument command,
Decoder<T> decoder,
ConnectionSource source,
ReadPreference readPreference) |
private static <D,T> T |
executeWrappedCommandProtocol(java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<D> decoder,
Connection connection,
ReadPreference readPreference,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SessionContext sessionContext) |
private static <T> T |
executeWrappedCommandProtocol(java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<T> decoder,
ConnectionSource source,
ReadPreference readPreference) |
(package private) static BsonDocument |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command) |
(package private) static <T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static BsonDocument |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
Connection connection) |
(package private) static <T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
Connection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static <T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<BsonDocument> decoder,
Connection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static <D,T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<D> decoder,
CommandOperationHelper.CommandTransformer<D,T> transformer) |
(package private) static <T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<T> decoder) |
(package private) static <T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<BsonDocument> decoder,
Connection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer) |
(package private) static <D,T> T |
executeWrappedCommandProtocol(WriteBinding binding,
java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<D> decoder,
CommandOperationHelper.CommandTransformer<D,T> transformer) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncReadBinding binding,
java.lang.String database,
BsonDocument command,
AsyncConnection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncReadBinding binding,
java.lang.String database,
BsonDocument command,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncReadBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<BsonDocument> decoder,
AsyncConnection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <D,T> void |
executeWrappedCommandProtocolAsync(AsyncReadBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<D> decoder,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncReadBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<T> decoder,
SingleResultCallback<T> callback) |
(package private) static void |
executeWrappedCommandProtocolAsync(AsyncReadBinding binding,
java.lang.String database,
BsonDocument command,
SingleResultCallback<BsonDocument> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
AsyncConnection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
AsyncConnection connection,
SingleResultCallback<BsonDocument> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<BsonDocument> decoder,
AsyncConnection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <D,T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<D> decoder,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
Decoder<T> decoder,
SingleResultCallback<T> callback) |
(package private) static <T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<BsonDocument> decoder,
AsyncConnection connection,
CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer,
SingleResultCallback<T> callback) |
(package private) static <D,T> void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<D> decoder,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SingleResultCallback<T> callback) |
(package private) static void |
executeWrappedCommandProtocolAsync(AsyncWriteBinding binding,
java.lang.String database,
BsonDocument command,
SingleResultCallback<BsonDocument> callback) |
private static <D,T> void |
executeWrappedCommandProtocolAsync(java.lang.String database,
BsonDocument command,
Decoder<D> decoder,
AsyncConnection connection,
ReadPreference readPreference,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SessionContext sessionContext,
SingleResultCallback<T> callback) |
private static <D,T> void |
executeWrappedCommandProtocolAsync(java.lang.String database,
BsonDocument command,
FieldNameValidator fieldNameValidator,
Decoder<D> decoder,
AsyncConnection connection,
ReadPreference readPreference,
CommandOperationHelper.CommandTransformer<D,T> transformer,
SessionContext sessionContext,
SingleResultCallback<T> callback) |
(package private) static boolean |
isNamespaceError(java.lang.Throwable t) |
(package private) static boolean |
isRetryableException(java.lang.Throwable t) |
(package private) static void |
rethrowIfNotNamespaceError(MongoCommandException e) |
(package private) static <T> T |
rethrowIfNotNamespaceError(MongoCommandException e,
T defaultValue) |
static BsonDocument executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command)
static <T> T executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static <T> T executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command, Decoder<T> decoder)
static <D,T> T executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command, Decoder<D> decoder, CommandOperationHelper.CommandTransformer<D,T> transformer)
static BsonDocument executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command, Connection connection)
static <T> T executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command, Connection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static <T> T executeWrappedCommandProtocol(ReadBinding binding, java.lang.String database, BsonDocument command, Decoder<BsonDocument> decoder, Connection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static BsonDocument executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command)
static <T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, Decoder<T> decoder)
static <T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static <D,T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, Decoder<D> decoder, CommandOperationHelper.CommandTransformer<D,T> transformer)
static <T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, Connection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static <T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, Decoder<BsonDocument> decoder, Connection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static <T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<BsonDocument> decoder, Connection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer)
static <D,T> T executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<D> decoder, CommandOperationHelper.CommandTransformer<D,T> transformer)
static BsonDocument executeWrappedCommandProtocol(WriteBinding binding, java.lang.String database, BsonDocument command, Connection connection)
private static <T> T executeWrappedCommandProtocol(java.lang.String database, BsonDocument command, Decoder<T> decoder, ConnectionSource source, ReadPreference readPreference)
private static <T> T executeWrappedCommandProtocol(java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<T> decoder, ConnectionSource source, ReadPreference readPreference)
private static <T> T executeWrappedCommandProtocol(java.lang.String database, BsonDocument command, Decoder<T> decoder, Connection connection, ReadPreference readPreference, SessionContext sessionContext)
private static <D,T> T executeWrappedCommandProtocol(java.lang.String database, BsonDocument command, Decoder<D> decoder, Connection connection, ReadPreference readPreference, CommandOperationHelper.CommandTransformer<D,T> transformer, SessionContext sessionContext)
private static <D,T> T executeWrappedCommandProtocol(java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<D> decoder, Connection connection, ReadPreference readPreference, CommandOperationHelper.CommandTransformer<D,T> transformer, SessionContext sessionContext)
static void executeWrappedCommandProtocolAsync(AsyncReadBinding binding, java.lang.String database, BsonDocument command, SingleResultCallback<BsonDocument> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncReadBinding binding, java.lang.String database, BsonDocument command, Decoder<T> decoder, SingleResultCallback<T> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncReadBinding binding, java.lang.String database, BsonDocument command, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
static <D,T> void executeWrappedCommandProtocolAsync(AsyncReadBinding binding, java.lang.String database, BsonDocument command, Decoder<D> decoder, CommandOperationHelper.CommandTransformer<D,T> transformer, SingleResultCallback<T> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncReadBinding binding, java.lang.String database, BsonDocument command, AsyncConnection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncReadBinding binding, java.lang.String database, BsonDocument command, Decoder<BsonDocument> decoder, AsyncConnection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
static void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, SingleResultCallback<BsonDocument> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, Decoder<T> decoder, SingleResultCallback<T> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
static <D,T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, Decoder<D> decoder, CommandOperationHelper.CommandTransformer<D,T> transformer, SingleResultCallback<T> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, Decoder<BsonDocument> decoder, AsyncConnection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<BsonDocument> decoder, AsyncConnection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
static <D,T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<D> decoder, CommandOperationHelper.CommandTransformer<D,T> transformer, SingleResultCallback<T> callback)
static void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, AsyncConnection connection, SingleResultCallback<BsonDocument> callback)
static <T> void executeWrappedCommandProtocolAsync(AsyncWriteBinding binding, java.lang.String database, BsonDocument command, AsyncConnection connection, CommandOperationHelper.CommandTransformer<BsonDocument,T> transformer, SingleResultCallback<T> callback)
private static <D,T> void executeWrappedCommandProtocolAsync(java.lang.String database, BsonDocument command, Decoder<D> decoder, AsyncConnection connection, ReadPreference readPreference, CommandOperationHelper.CommandTransformer<D,T> transformer, SessionContext sessionContext, SingleResultCallback<T> callback)
private static <D,T> void executeWrappedCommandProtocolAsync(java.lang.String database, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<D> decoder, AsyncConnection connection, ReadPreference readPreference, CommandOperationHelper.CommandTransformer<D,T> transformer, SessionContext sessionContext, SingleResultCallback<T> callback)
static <T,R> R executeRetryableCommand(WriteBinding binding, java.lang.String database, ReadPreference readPreference, FieldNameValidator fieldNameValidator, Decoder<T> commandResultDecoder, CommandOperationHelper.CommandCreator commandCreator, CommandOperationHelper.CommandTransformer<T,R> transformer)
static <T,R> void executeRetryableCommand(AsyncWriteBinding binding, java.lang.String database, ReadPreference readPreference, FieldNameValidator fieldNameValidator, Decoder<T> commandResultDecoder, CommandOperationHelper.CommandCreator commandCreator, CommandOperationHelper.CommandTransformer<T,R> transformer, SingleResultCallback<R> originalCallback)
private static <T,R> SingleResultCallback<T> createCommandCallback(AsyncWriteBinding binding, AsyncConnectionSource oldSource, AsyncConnection oldConnection, java.lang.String database, ReadPreference readPreference, BsonDocument command, FieldNameValidator fieldNameValidator, Decoder<T> commandResultDecoder, CommandOperationHelper.CommandTransformer<T,R> transformer, SingleResultCallback<R> callback)
static boolean isRetryableException(java.lang.Throwable t)
static void rethrowIfNotNamespaceError(MongoCommandException e)
static <T> T rethrowIfNotNamespaceError(MongoCommandException e, T defaultValue)
static boolean isNamespaceError(java.lang.Throwable t)