Package | Description |
---|---|
com.allanbank.mongodb.connection.auth |
Wraps a connection and ensures that all requests are properly authenticated.
|
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.
|
Modifier and Type | Method and Description |
---|---|
AuthenticatingConnection |
AuthenticationConnectionFactory.connect(ServerState server,
MongoClientConfiguration config)
Creates a connection to the address provided.
|
Modifier and Type | Method and Description |
---|---|
Connection |
ProxiedConnectionFactory.connect(ServerState server,
MongoClientConfiguration config)
Creates a connection to the address provided.
|
Modifier and Type | Method and Description |
---|---|
protected List<ServerState> |
ReplicaSetConnection.findPotentialServers(Message message1,
Message message2)
Locates the set of servers that can be used to send the specified
messages.
|
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 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.
|
Constructor and Description |
---|
ReplicaSetConnection(Connection proxiedConnection,
ServerState server,
ClusterState cluster,
ProxiedConnectionFactory factory,
MongoClientConfiguration config)
Creates a new
ReplicaSetConnection . |
Modifier and Type | Method and Description |
---|---|
Connection |
SocketConnectionFactory.connect(ServerState server,
MongoClientConfiguration config)
Creates a connection to the address provided.
|
Constructor and Description |
---|
SocketConnection(ServerState server,
MongoClientConfiguration config)
Creates a new SocketConnection to a MongoDB server.
|
Modifier and Type | Field and Description |
---|---|
static Comparator<ServerState> |
ServerLatencyComparator.COMPARATOR
A singleton instance of the comparator.
|
protected ConcurrentMap<String,ServerState> |
ClusterState.myServers
The complete list of servers.
|
Modifier and Type | Method and Description |
---|---|
ServerState |
ClusterState.add(String address)
Adds a
ServerState to the ClusterState for the address
provided if one does not already exist. |
ServerState |
ClusterState.get(String address)
Returns the server state for the address provided.
|
Modifier and Type | Method and Description |
---|---|
protected List<ServerState> |
ClusterState.findCandidateServer(ReadPreference readPreference)
Finds the candidate server, if known.
|
List<ServerState> |
ClusterState.findCandidateServers(ReadPreference readPreference)
Returns the set of servers that can be used based on the provided
ReadPreference . |
protected List<ServerState> |
ClusterState.findNearestCandidates(ReadPreference readPreference)
Returns the list of servers that match the read preference's tags.
|
protected List<ServerState> |
ClusterState.findNonWritableCandidates(ReadPreference readPreference)
Returns the list of non-writable servers that match the read preference's
tags.
|
protected List<ServerState> |
ClusterState.findWritableCandidates(ReadPreference readPreference)
Returns the list of writable servers that match the read preference's
tags.
|
List<ServerState> |
ClusterState.getNonWritableServers()
Returns a copy of the list of non-writable servers.
|
List<ServerState> |
ClusterState.getServers()
Returns a copy of the list of servers.
|
List<ServerState> |
ClusterState.getWritableServers()
Returns a copy of the list of writable servers.
|
List<ServerState> |
LatencyServerSelector.pickServers()
Picks a server to try and connect to.
|
List<ServerState> |
ServerSelector.pickServers()
Picks a server to try and connect to.
|
Modifier and Type | Method and Description |
---|---|
int |
ServerLatencyComparator.compare(ServerState o1,
ServerState o2) |
protected boolean |
AbstractReconnectStrategy.isConnected(ServerState server,
Connection connection)
Pings the server to verify that the connection is active.
|
void |
ClusterState.markNotWritable(ServerState server)
Marks the server as non-writable.
|
void |
ClusterState.markWritable(ServerState server)
Marks the server as writable.
|
boolean |
ClusterPinger.Pinger.ping(InetSocketAddress addr,
Connection conn,
ServerState state)
Pings the server and suppresses all exceptions.
|
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 |
---|---|
protected double[] |
ClusterState.cdf(List<ServerState> servers)
Computes a relative CDF (cumulative distribution function) for the
servers based on the latency from the client.
|
protected void |
ClusterState.sort(List<ServerState> servers)
Sorts the servers based on the latency from the client.
|
Constructor and Description |
---|
SecondsBehindCallback(ServerState server)
Creates a new SecondsBehindCallback.
|
ServerLatencyCallback(ServerState server)
Creates a new ServerLatencyCallback.
|
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.