public class SingleConnectionReadBinding extends java.lang.Object implements ReadBinding
Constructor and Description |
---|
SingleConnectionReadBinding(ReadPreference readPreference,
ServerDescription serverDescription,
Connection connection)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getCount()
Gets the current reference count, which starts at 0.
|
ConnectionSource |
getReadConnectionSource()
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.
|
ReadBinding |
retain()
Retain an additional reference to this object.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCount
public SingleConnectionReadBinding(ReadPreference readPreference, ServerDescription serverDescription, Connection connection)
readPreference
- the read preference of this bindingserverDescription
- the description of the serverconnection
- the connection to bind to.public ReadPreference getReadPreference()
ReadBinding
getReadPreference
in interface ReadBinding
public ConnectionSource getReadConnectionSource()
ReadBinding
getReadConnectionSource
in interface ReadBinding
public SessionContext getSessionContext()
ReadBinding
getSessionContext
in interface ReadBinding
public ReadBinding retain()
ReferenceCounted
retain
in interface ReadBinding
retain
in interface ReferenceCounted
public void release()
ReferenceCounted
release
in interface ReferenceCounted
public int getCount()
ReferenceCounted
getCount
in interface ReferenceCounted
Copyright © 2010 - 2020 Adobe. All Rights Reserved