public class ServerLatencyCallback extends FutureCallback<Reply>
CLASS
Constructor and Description |
---|
ServerLatencyCallback(ServerState server)
Creates a new ServerLatencyCallback.
|
Modifier and Type | Method and Description |
---|---|
void |
callback(Reply result)
Called when the MongoDB operation has completed with the result of the
operation.
|
cancel, exception, get, get, isCancelled, isDone
public ServerLatencyCallback(ServerState server)
server
- The server we are tracking the latency for.public void callback(Reply result)
Sets the value for the future and triggers any pending FutureCallback.get()
to
return.
Overridden to update the server's latency based on the round trip reply time.
callback
in interface Callback<Reply>
callback
in class FutureCallback<Reply>
result
- The result of the operation.Callback.callback(V)
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.