@Deprecated public class AsyncSingleServerBinding extends com.mongodb.internal.binding.AbstractReferenceCounted implements AsyncReadWriteBinding
Constructor and Description |
---|
AsyncSingleServerBinding(Cluster cluster,
ServerAddress serverAddress)
Deprecated.
Creates an instance, defaulting to
ReadPreference.primary() for reads. |
AsyncSingleServerBinding(Cluster cluster,
ServerAddress serverAddress,
ReadPreference readPreference)
Deprecated.
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
getReadConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
Deprecated.
Returns a connection source to a server that satisfies the specified read preference.
|
ReadPreference |
getReadPreference()
Deprecated.
The read preference that all connection sources returned by this instance will satisfy.
|
SessionContext |
getSessionContext()
Deprecated.
Gets the session context for this binding.
|
void |
getWriteConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
Deprecated.
Supply a connection source to a server that can be written to
|
AsyncSingleServerBinding |
retain()
Deprecated.
Retain an additional reference to this object.
|
getCount, release
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCount, release
public AsyncSingleServerBinding(Cluster cluster, ServerAddress serverAddress)
ReadPreference.primary()
for reads.cluster
- a non-null Cluster which will be used to select a server to bind toserverAddress
- a non-null address of the server to bind topublic AsyncSingleServerBinding(Cluster cluster, ServerAddress serverAddress, ReadPreference readPreference)
cluster
- a non-null Cluster which will be used to select a server to bind toserverAddress
- a non-null address of the server to bind toreadPreference
- a non-null ReadPreference for read operationspublic ReadPreference getReadPreference()
AsyncReadBinding
getReadPreference
in interface AsyncReadBinding
public void getReadConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
AsyncReadBinding
getReadConnectionSource
in interface AsyncReadBinding
callback
- the to be passed the connection sourcepublic void getWriteConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
AsyncWriteBinding
getWriteConnectionSource
in interface AsyncWriteBinding
callback
- the to be passed the connection sourcepublic SessionContext getSessionContext()
AsyncReadBinding
getSessionContext
in interface AsyncReadBinding
getSessionContext
in interface AsyncWriteBinding
public AsyncSingleServerBinding retain()
ReferenceCounted
retain
in interface AsyncReadBinding
retain
in interface AsyncReadWriteBinding
retain
in interface AsyncWriteBinding
retain
in interface ReferenceCounted
retain
in class com.mongodb.internal.binding.AbstractReferenceCounted
Copyright © 2010 - 2023 Adobe. All Rights Reserved