public class AsyncSingleConnectionReadBinding extends java.lang.Object implements AsyncReadBinding
| 构造器和说明 |
|---|
AsyncSingleConnectionReadBinding(ReadPreference readPreference,
ServerDescription serverDescription,
AsyncConnection connection)
Construct an instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
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 在接口中 AsyncReadBindingpublic void getReadConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
AsyncReadBindinggetReadConnectionSource 在接口中 AsyncReadBindingcallback - the to be passed the connection sourcepublic AsyncReadBinding retain()
ReferenceCountedretain 在接口中 AsyncReadBindingretain 在接口中 ReferenceCountedpublic void release()
ReferenceCountedrelease 在接口中 ReferenceCountedpublic int getCount()
ReferenceCountedgetCount 在接口中 ReferenceCounted