Class SingleServerReadBinding
Represents a read binding to a single server;
public sealed class SingleServerReadBinding : IReadBinding, IBinding, IDisposable
- Inheritance
-
SingleServerReadBinding
- Implements
- Inherited Members
Constructors
SingleServerReadBinding(IServer, ReadPreference, ICoreSessionHandle)
Initializes a new instance of the SingleServerReadBinding class.
public SingleServerReadBinding(IServer server, ReadPreference readPreference, ICoreSessionHandle session)
Parameters
serverIServerThe server.
readPreferenceReadPreferenceThe read preference.
sessionICoreSessionHandleThe session.
Properties
ReadPreference
Gets the read preference.
public ReadPreference ReadPreference { get; }
Property Value
- ReadPreference
The read preference.
Session
Gets the session.
public ICoreSessionHandle Session { get; }
Property Value
- ICoreSessionHandle
The session.
Methods
Dispose()
public void Dispose()
GetReadChannelSource(CancellationToken)
Gets a channel source for read operations.
public IChannelSourceHandle GetReadChannelSource(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenThe cancellation token.
Returns
- IChannelSourceHandle
A channel source.
GetReadChannelSourceAsync(CancellationToken)
Gets a channel source for read operations.
public Task<IChannelSourceHandle> GetReadChannelSourceAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<IChannelSourceHandle>
A channel source.