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.client.connection |
Provides interfaces for managing connections to different MongoDB server configurations.
|
com.allanbank.mongodb.client.connection.auth |
Wraps a connection and ensures that all requests are properly authenticated.
|
com.allanbank.mongodb.client.connection.bootstrap |
Bootstraps a the correct type of connections for the type of MongoDB cluster.
|
com.allanbank.mongodb.client.connection.proxy |
Support for connection that delegate to a lower level connection.
|
com.allanbank.mongodb.client.connection.rs |
Support for connections to Replica Sets.
|
com.allanbank.mongodb.client.connection.sharded |
Support for connections to Sharded Configurations.
|
com.allanbank.mongodb.client.connection.socket |
Low level socket connection to a single MongoDB server.
|
com.allanbank.mongodb.client.state |
Support for tracking the state of a set of MongoDB servers.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
SerialClientImpl.findConnection(Message message1,
Message message2)
Tries to reuse the last connection used.
|
protected abstract Connection |
AbstractClient.findConnection(Message message1,
Message message2)
Locates a
Connection to send a message on. |
protected Connection |
ClientImpl.findConnection(Message message1,
Message message2)
Locates a
Connection to send a message on. |
protected Connection |
ClientImpl.searchConnection(Message message1,
Message message2,
boolean waitForReconnect)
Searches for a connection to use.
|
Modifier and Type | Method and Description |
---|---|
protected void |
ClientImpl.handleConnectionClosed(Connection connection)
Tries to reconnect previously open
Connection s. |
protected void |
ClientImpl.reconnect(Connection connection)
Runs the reconnect logic for the connection.
|
Modifier and Type | Method and Description |
---|---|
Connection |
ConnectionFactory.connect()
Creates a connection to the address provided.
|
Connection |
ReconnectStrategy.reconnect(Connection oldConnection)
Encapsulates the strategy for re-establishing the connection to the
server.
|
Modifier and Type | Method and Description |
---|---|
Connection |
ReconnectStrategy.reconnect(Connection oldConnection)
Encapsulates the strategy for re-establishing the connection to the
server.
|
Modifier and Type | Class and Description |
---|---|
class |
AuthenticatingConnection
AuthenticatingConnection provides a connection that authenticated with the
server for each database before it is used.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
AuthenticatingConnection.getProxiedConnection()
Returns the proxiedConnection value.
|
Modifier and Type | Method and Description |
---|---|
void |
MongoDbAuthenticator.startAuthentication(Credential credential,
Connection connection)
Starts to authenticate the user with the specified credentials.
|
void |
Authenticator.startAuthentication(Credential credentials,
Connection connection)
Starts to authenticate the user with the specified credentials.
|
Constructor and Description |
---|
AuthenticatingConnection(Connection connection,
MongoClientConfiguration config)
Creates a new AuthenticatingConnection.
|
Modifier and Type | Method and Description |
---|---|
Connection |
BootstrapConnectionFactory.connect()
Creates a connection to the address provided.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractProxyConnection
A helper class for constructing connections that are really just proxies on
top of other connections.
|
class |
AbstractProxyMultipleConnection<K>
AbstractProxyMultipleConnection provides the core functionality for a
connection that multiplexes requests across multiple connections.
|
Modifier and Type | Field and Description |
---|---|
protected AtomicReference<Connection> |
AbstractProxyMultipleConnection.myLastUsedConnection
The most recently used connection.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
AbstractProxyMultipleConnection.cacheConnection(K server,
Connection conn)
Caches the connection to the server if there is not already a connection
in the cache.
|
protected abstract Connection |
AbstractProxyMultipleConnection.connect(K server)
Attempts to create a connection to the server, catching any exceptions
thrown.
|
Connection |
ProxiedConnectionFactory.connect(Server server,
MongoClientConfiguration config)
Creates a connection to the address provided.
|
protected Connection |
AbstractProxyMultipleConnection.connection(K server)
Returns the cached connection for the specified key.
|
Connection |
ConnectionInfo.getConnection()
Returns the connection to the primary server.
|
protected Connection |
AbstractProxyConnection.getProxiedConnection()
Returns the proxiedConnection value.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
AbstractProxyMultipleConnection.cacheConnection(K server,
Connection conn)
Caches the connection to the server if there is not already a connection
in the cache.
|
protected void |
AbstractProxyMultipleConnection.doSend(Connection conn,
Message message1,
Message message2,
ReplyCallback reply)
Sends the message on the connection.
|
protected void |
AbstractProxyMultipleConnection.handleConnectionClosed(Connection connection)
Tries to reconnect previously open
Connection s. |
protected void |
AbstractProxyMultipleConnection.removeCachedConnection(Object key,
Connection connection)
Remove the connection from the cache.
|
Constructor and Description |
---|
AbstractProxyConnection(Connection proxiedConnection)
Creates a AbstractProxyConnection.
|
AbstractProxyMultipleConnection(Connection proxiedConnection,
K server,
Cluster cluster,
ProxiedConnectionFactory factory,
MongoClientConfiguration config)
Creates a new
AbstractProxyMultipleConnection . |
ConnectionInfo(Connection connection,
K connectionKey)
Creates a new ConnectionInfo.
|
Modifier and Type | Class and Description |
---|---|
class |
ReplicaSetConnection
Provides a
Connection implementation for connecting to a replica-set
environment. |
Modifier and Type | Method and Description |
---|---|
Connection |
ReplicaSetConnectionFactory.connect()
Creates a new connection to the replica set.
|
protected Connection |
ReplicaSetConnection.connect(Server server)
Attempts to create a connection to the server, catching any exceptions
thrown.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
ReplicaSetConnectionFactory.isWritable(Server server,
Connection connection)
Determines if the connection is to the primary member of the cluster.
|
ReplicaSetConnection |
ReplicaSetReconnectStrategy.reconnect(Connection oldConnection)
Encapsulates the strategy for re-establishing the connection to the
server.
|
Modifier and Type | Method and Description |
---|---|
protected ConnectionInfo<Server> |
ReplicaSetReconnectStrategy.checkForReply(Cluster state,
Map<Server,Future<Reply>> answers,
Map<Server,Connection> connections,
long deadline)
Checks for a reply from a server.
|
protected String |
ReplicaSetReconnectStrategy.checkReply(Future<Reply> replyFuture,
Map<Server,Connection> connections,
Server server,
long deadline)
Extracts who the server thinks is the primary from the reply.
|
protected Future<Reply> |
ReplicaSetReconnectStrategy.sendIsPrimary(Map<Server,Future<Reply>> answers,
Map<Server,Connection> connections,
Server server,
boolean isPrimary)
Sends a command to the server to return what it thinks the state of the
cluster is.
|
protected boolean |
ReplicaSetReconnectStrategy.verifyPutative(Map<Server,Future<Reply>> answers,
Map<Server,Connection> connections,
Server putativePrimary,
long deadline)
Tries to verify that the suspected primary server is in fact the primary
server by asking it directly and synchronously.
|
Constructor and Description |
---|
ReplicaSetConnection(Connection proxiedConnection,
Server server,
Cluster cluster,
ProxiedConnectionFactory factory,
MongoClientConfiguration config,
ReplicaSetReconnectStrategy strategy)
Creates a new
ReplicaSetConnection . |
Modifier and Type | Class and Description |
---|---|
class |
ShardedConnection
Provides a
Connection implementation for connecting to a sharded
environment via mongos servers. |
Modifier and Type | Method and Description |
---|---|
Connection |
ShardedConnectionFactory.connect()
Creates a new connection to the shared mongos servers.
|
protected Connection |
ShardedConnection.connect(Server server)
Attempts to create a connection to the server, catching any exceptions
thrown.
|
protected Connection |
ShardedConnection.connection(Server server)
Returns the cached connection for the specified key.
|
protected Connection |
ShardedConnectionFactory.wrap(Connection primaryConn,
Server server)
Wraps the connection in a shard-aware connection.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
ShardedConnectionFactory.findMongosServers(Connection conn)
Performs a find on the config database's mongos
collection to return the id for all of the mongos servers in the cluster.
|
protected void |
ShardedConnectionFactory.update(ShardedConnectionFactory.BootstrapState state,
Connection conn)
Queries for the addresses for the
mongos servers via the
ShardedConnectionFactory.findMongosServers(Connection) method. |
protected Connection |
ShardedConnectionFactory.wrap(Connection primaryConn,
Server server)
Wraps the connection in a shard-aware connection.
|
Constructor and Description |
---|
ShardedConnection(Connection proxiedConnection,
Server server,
Cluster cluster,
ServerSelector selector,
ProxiedConnectionFactory factory,
MongoClientConfiguration config)
Creates a new
ShardedConnection . |
Modifier and Type | Class and Description |
---|---|
class |
AbstractSocketConnection
AbstractSocketConnection provides the basic functionality for a socket
connection that passes messages between the sender and receiver.
|
class |
SocketConnection
Provides a blocking Socket based connection to a MongoDB server.
|
class |
TwoThreadSocketConnection
Provides a blocking Socket based connection to a MongoDB server.
|
Modifier and Type | Method and Description |
---|---|
Connection |
SocketConnectionFactory.connect()
Creates a connection to the address provided.
|
Connection |
SocketConnectionFactory.connect(Server server,
MongoClientConfiguration config)
Creates a connection to the address provided.
|
Modifier and Type | Method and Description |
---|---|
Connection |
SimpleReconnectStrategy.reconnect(Connection oldConnection)
Encapsulates the strategy for re-establishing the connection to the
server.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
AbstractReconnectStrategy.isConnected(Server server,
Connection connection)
Pings the server to verify that the connection is active.
|
static boolean |
ClusterPinger.ping(Server server,
Connection conn)
Pings the server and suppresses all exceptions.
|
boolean |
ClusterPinger.Pinger.ping(Server server,
Connection conn)
Pings the server and suppresses all exceptions.
|
Future<Reply> |
ClusterPinger.Pinger.pingAsync(ClusterType type,
Server server,
Connection conn)
Pings the server and suppresses all exceptions.
|
Connection |
SimpleReconnectStrategy.reconnect(Connection oldConnection)
Encapsulates the strategy for re-establishing the connection to the
server.
|
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.