Package | Description |
---|---|
com.allanbank.mongodb.client |
Provides implementations of the main client interfaces and classes to translate the
Reply (s) from the server. |
com.allanbank.mongodb.connection |
Provides interfaces for managing connections to different MongoDB server configurations.
|
com.allanbank.mongodb.connection.auth |
Wraps a connection and ensures that all requests are properly authenticated.
|
com.allanbank.mongodb.connection.message |
Low level messages to be sent to the MongoDB server.
|
com.allanbank.mongodb.connection.proxy |
Support for connection that delegate to a lower level connection.
|
com.allanbank.mongodb.connection.rs |
Support for connections to Replica Sets.
|
com.allanbank.mongodb.connection.socket |
Low level socket connection to a single MongoDB server.
|
com.allanbank.mongodb.connection.state |
Support for tracking the state of a set of MongoDB servers.
|
com.allanbank.mongodb.error |
Exceptions for common MongoDB error conditions.
|
Modifier and Type | Method and Description |
---|---|
protected MongoDbException |
AbstractValidatingReplyCallback.asError(Reply reply)
Creates an exception from the
Reply . |
protected MongoDbException |
AbstractValidatingReplyCallback.asError(Reply reply,
boolean knownError)
Creates an exception from the
Reply . |
protected MongoDbException |
AbstractValidatingReplyCallback.asError(Reply reply,
int okValue,
int errorNumber,
String errorMessage)
Creates an exception from the parsed reply fields.
|
void |
AbstractValidatingReplyCallback.callback(Reply result)
Called when the MongoDB operation has completed with the result of the
operation.
|
protected void |
AbstractValidatingReplyCallback.checkForError(Reply reply)
Checks for a non-flag error in the reply.
|
protected abstract F |
AbstractReplyCallback.convert(Reply reply)
Converts the
Reply into the final response type. |
protected List<Document> |
ReplyResultCallback.convert(Reply reply)
Converts the
Reply into the final response type. |
protected void |
AbstractReplyCallback.handle(Reply reply)
Called once the
Reply has been validated. |
protected abstract void |
AbstractValidatingReplyCallback.handle(Reply reply)
Called once the
Reply has been validated. |
protected void |
AbstractValidatingReplyCallback.verify(Reply reply)
Checks the reply for an error message.
|
Modifier and Type | Method and Description |
---|---|
protected long |
MongoIteratorImpl.retreiveCursorIdFromPendingRequest(long cursorId,
Future<Reply> replyFuture)
If the current cursor id is zero then waits for the response from the
pending request to determine the real cursor id.
|
String |
AbstractClient.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
Client.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
AbstractClient.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
Client.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
Constructor and Description |
---|
MongoIteratorImpl(Query originalQuery,
Client client,
String server,
Reply reply)
Create a new MongoDBInterator.
|
Modifier and Type | Method and Description |
---|---|
String |
Connection.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
Connection.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
Modifier and Type | Method and Description |
---|---|
String |
AuthenticatingConnection.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
AuthenticatingConnection.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
Modifier and Type | Method and Description |
---|---|
Callback<Reply> |
PendingMessage.getReplyCallback()
Returns the callback for the reply to the message.
|
Modifier and Type | Method and Description |
---|---|
static void |
ReplyHandler.reply(Reply reply,
Callback<Reply> replyCallback,
Executor executor)
Updates to set the reply for the callback, if any.
|
Modifier and Type | Method and Description |
---|---|
void |
PendingMessageQueue.put(Message message,
Callback<Reply> replyCallback)
Puts a message onto the queue.
|
void |
PendingMessageQueue.put(Message message,
Callback<Reply> replyCallback,
Message message2,
Callback<Reply> replyCallback2)
Puts two messages onto the queue.
|
void |
PendingMessageQueue.put(Message message,
Callback<Reply> replyCallback,
Message message2,
Callback<Reply> replyCallback2)
Puts two messages onto the queue.
|
static void |
ReplyHandler.raiseError(Throwable exception,
Callback<Reply> replyCallback,
Executor executor)
Raise an error on the callback, if any.
|
static void |
ReplyHandler.reply(Reply reply,
Callback<Reply> replyCallback,
Executor executor)
Updates to set the reply for the callback, if any.
|
void |
PendingMessage.set(int messageId,
Message message,
Callback<Reply> replyCallback)
Sets the state of the pending message.
|
Constructor and Description |
---|
ReplyHandler(Callback<Reply> replyCallback,
Reply reply)
Creates a new ReplyHandler.
|
Constructor and Description |
---|
PendingMessage(int messageId,
Message message,
Callback<Reply> replyCallback)
Create a new PendingMessage.
|
ReplyHandler(Callback<Reply> replyCallback,
Reply reply)
Creates a new ReplyHandler.
|
ReplyHandler(Callback<Reply> replyCallback,
Throwable exception)
Creates a new ReplyHandler.
|
Modifier and Type | Method and Description |
---|---|
String |
AbstractProxyConnection.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
AbstractProxyConnection.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
Modifier and Type | Method and Description |
---|---|
protected Future<Reply> |
ReplicaSetReconnectStrategy.sendIsPrimary(Map<InetSocketAddress,Future<Reply>> answers,
Map<InetSocketAddress,Connection> connections,
ServerState server,
boolean isPrimary)
Sends a command to the server to return what it thinks the state of the
cluster is.
|
Modifier and Type | Method and Description |
---|---|
protected ReplicaSetConnection |
ReplicaSetReconnectStrategy.checkForReply(Connection oldConnection,
Map<InetSocketAddress,Future<Reply>> answers,
Map<InetSocketAddress,Connection> connections)
Checks for a reply from a server.
|
protected String |
ReplicaSetReconnectStrategy.checkReply(Future<Reply> replyFuture,
Map<InetSocketAddress,Connection> connections,
InetSocketAddress addr)
Extracts who the server thinks is the primary from the reply.
|
protected String |
ReplicaSetConnection.doSend(Connection conn,
Message message1,
Message message2,
Callback<Reply> reply)
Sends the message on the connection.
|
String |
ReplicaSetConnection.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
ReplicaSetConnection.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
protected Future<Reply> |
ReplicaSetReconnectStrategy.sendIsPrimary(Map<InetSocketAddress,Future<Reply>> answers,
Map<InetSocketAddress,Connection> connections,
ServerState server,
boolean isPrimary)
Sends a command to the server to return what it thinks the state of the
cluster is.
|
protected String |
ReplicaSetConnection.trySend(List<ServerState> servers,
Message message1,
Message message2,
Callback<Reply> reply)
Tries to send the messages to the first server with either an open
connection or that we can open a connection to.
|
protected String |
ReplicaSetConnection.trySendToOpenConnection(List<ServerState> servers,
Message message1,
Message message2,
Callback<Reply> reply)
Tries to send the messages to the first server with an open connection.
|
protected boolean |
ReplicaSetReconnectStrategy.verifyPutative(Map<InetSocketAddress,Future<Reply>> answers,
Map<InetSocketAddress,Connection> connections,
String putativePrimary)
Tries to verify that the suspected primary server is in fact the primary
server by asking it directly and synchronously.
|
Modifier and Type | Method and Description |
---|---|
void |
SocketConnection.NoopCallback.callback(Reply result)
Called when the MongoDB operation has completed with the result of the
operation.
|
protected void |
SocketConnection.reply(Reply reply,
Callback<Reply> replyCallback)
Updates to set the reply for the callback, if any.
|
Modifier and Type | Method and Description |
---|---|
protected void |
SocketConnection.raiseError(Throwable exception,
Callback<Reply> replyCallback)
Updates to raise an error on the callback, if any.
|
protected void |
SocketConnection.reply(Reply reply,
Callback<Reply> replyCallback)
Updates to set the reply for the callback, if any.
|
String |
SocketConnection.send(Message message,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
String |
SocketConnection.send(Message message1,
Message message2,
Callback<Reply> replyCallback)
Sends a message on the connection.
|
Modifier and Type | Method and Description |
---|---|
Future<Reply> |
ClusterPinger.Pinger.pingAsync(ClusterType type,
InetSocketAddress addr,
Connection conn,
ServerState state)
Pings the server and suppresses all exceptions.
|
Modifier and Type | Method and Description |
---|---|
void |
ServerLatencyCallback.callback(Reply result)
Called when the MongoDB operation has completed with the result of the
operation.
|
void |
SecondsBehindCallback.callback(Reply result)
Called when the MongoDB operation has completed with the result of the
operation.
|
Modifier and Type | Method and Description |
---|---|
Reply |
ReplyException.getReply()
Returns the reply.
|
Constructor and Description |
---|
CursorNotFoundException(Reply reply,
String message)
Create a new CursorNotFoundException.
|
CursorNotFoundException(Reply reply,
Throwable cause)
Create a new CursorNotFoundException.
|
DuplicateKeyException(int okValue,
int errorNumber,
String errorMessage,
Reply reply)
Create a new DuplicateKeyException.
|
QueryFailedException(Reply reply,
Throwable cause)
Create a new QueryFailedException.
|
ReplyException(int okValue,
int errorNumber,
String errorMessage,
Message request,
Reply reply)
Create a new ReplyException.
|
ReplyException(int okValue,
int errorNumber,
String errorMessage,
Reply reply)
Create a new ReplyException.
|
ReplyException(Reply reply)
Create a new ReplyException.
|
ReplyException(Reply reply,
String message)
Create a new ReplyException.
|
ReplyException(Reply reply,
Throwable cause)
Create a new ReplyException.
|
ShardConfigStaleException(Reply reply,
Throwable cause)
Create a new ShardConfigStaleException.
|
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.