AsyncReadBinding, ReferenceCountedpublic class AsyncSingleConnectionReadBinding extends Object implements AsyncReadBinding
| Constructor | Description |
|---|---|
AsyncSingleConnectionReadBinding(ReadPreference readPreference,
ServerDescription serverDescription,
AsyncConnection connection) |
Construct an instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getCount() |
Gets the current reference count, which starts at 0.
|
void |
getReadConnectionSource(SingleResultCallback<AsyncConnectionSource> callback) |
Returns a connection source to a server that satisfies the specified read preference.
|
ReadPreference |
getReadPreference() |
The read preference that all connection sources returned by this instance will satisfy.
|
SessionContext |
getSessionContext() |
Gets the session context for this binding.
|
void |
release() |
Release a reference to this object.
|
AsyncReadBinding |
retain() |
Retain an additional reference to this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCountpublic AsyncSingleConnectionReadBinding(ReadPreference readPreference, ServerDescription serverDescription, AsyncConnection connection)
readPreference - the read preferenced of this bindingserverDescription - the description of the serverconnection - the connection to bind to.public ReadPreference getReadPreference()
AsyncReadBindinggetReadPreference in interface AsyncReadBindingpublic SessionContext getSessionContext()
AsyncReadBindinggetSessionContext in interface AsyncReadBindingpublic void getReadConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
AsyncReadBindinggetReadConnectionSource in interface AsyncReadBindingcallback - the to be passed the connection sourcepublic AsyncReadBinding retain()
ReferenceCountedretain in interface AsyncReadBindingretain in interface ReferenceCountedpublic void release()
ReferenceCountedrelease in interface ReferenceCountedpublic int getCount()
ReferenceCountedgetCount in interface ReferenceCounted