public final class RoundRobinConnectionDistributor extends AbstractNIOConnectionDistributor
transport
Constructor and Description |
---|
RoundRobinConnectionDistributor(NIOTransport transport) |
RoundRobinConnectionDistributor(NIOTransport transport,
boolean useDedicatedAcceptor) |
RoundRobinConnectionDistributor(NIOTransport transport,
boolean useDedicatedAcceptor,
boolean isServerOnly)
Constructs RoundRobinConnectionDistributor with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
registerChannel(SelectableChannel channel,
int interestOps,
Object attachment) |
void |
registerChannelAsync(SelectableChannel channel,
int interestOps,
Object attachment,
CompletionHandler<RegisterChannelResult> completionHandler) |
void |
registerServiceChannelAsync(SelectableChannel channel,
int interestOps,
Object attachment,
CompletionHandler<RegisterChannelResult> completionHandler) |
getTransportSelectorRunners, registerChannel, registerChannel, registerChannelAsync, registerChannelAsync, registerChannelAsync
public RoundRobinConnectionDistributor(NIOTransport transport)
public RoundRobinConnectionDistributor(NIOTransport transport, boolean useDedicatedAcceptor)
public RoundRobinConnectionDistributor(NIOTransport transport, boolean useDedicatedAcceptor, boolean isServerOnly)
transport
- useDedicatedAcceptor
- depending on this flag server Connection
s,
responsible for accepting client connections, will or will not
use dedicated SelectorRunner
isServerOnly
- true means this NIOChannelDistributor
will be used by a Transport
, which operates as a
server only(the Transport will never initiate a client-side Connection
).
In this case we're able to use optimized (thread unsafe) distribution algorithm.public void registerChannel(SelectableChannel channel, int interestOps, Object attachment) throws IOException
IOException
public void registerChannelAsync(SelectableChannel channel, int interestOps, Object attachment, CompletionHandler<RegisterChannelResult> completionHandler)
public void registerServiceChannelAsync(SelectableChannel channel, int interestOps, Object attachment, CompletionHandler<RegisterChannelResult> completionHandler)
Copyright © 2015 Oracle Corporation. All rights reserved.