org.glassfish.grizzly.nio
Class RoundRobinConnectionDistributor

java.lang.Object
  extended by org.glassfish.grizzly.nio.AbstractNIOConnectionDistributor
      extended by org.glassfish.grizzly.nio.RoundRobinConnectionDistributor
All Implemented Interfaces:
NIOChannelDistributor

public final class RoundRobinConnectionDistributor
extends AbstractNIOConnectionDistributor

RoundRobin NIOConnectionDistributor implementation, which allocates one SelectorRunner for OP_ACCEPT events and other event will be assign to a next SelectorRunner from the array.

Author:
Alexey Stashok

Field Summary
 
Fields inherited from class org.glassfish.grizzly.nio.AbstractNIOConnectionDistributor
transport
 
Constructor Summary
RoundRobinConnectionDistributor(NIOTransport transport)
           
 
Method Summary
 void registerChannel(SelectableChannel channel, int interestOps, Object attachment)
           
 void registerChannelAsync(SelectableChannel channel, int interestOps, Object attachment, CompletionHandler<RegisterChannelResult> completionHandler)
           
 
Methods inherited from class org.glassfish.grizzly.nio.AbstractNIOConnectionDistributor
getTransportSelectorRunners, registerChannel, registerChannel, registerChannelAsync, registerChannelAsync, registerChannelAsync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundRobinConnectionDistributor

public RoundRobinConnectionDistributor(NIOTransport transport)
Method Detail

registerChannel

public void registerChannel(SelectableChannel channel,
                            int interestOps,
                            Object attachment)
                     throws IOException
Throws:
IOException

registerChannelAsync

public void registerChannelAsync(SelectableChannel channel,
                                 int interestOps,
                                 Object attachment,
                                 CompletionHandler<RegisterChannelResult> completionHandler)


Copyright © 2012 Oracle Corporation. All Rights Reserved.