com.sun.grizzly.nio
Class RoundRobinConnectionDistributor

java.lang.Object
  extended by com.sun.grizzly.nio.AbstractNIOConnectionDistributor
      extended by com.sun.grizzly.nio.RoundRobinConnectionDistributor
All Implemented Interfaces:
NIOChannelDistributor

public 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 com.sun.grizzly.nio.AbstractNIOConnectionDistributor
transport
 
Constructor Summary
RoundRobinConnectionDistributor(AbstractNIOTransport transport)
           
 
Method Summary
 void registerChannel(SelectableChannel channel, int interestOps, Object attachment)
           
 Future<RegisterChannelResult> registerChannelAsync(SelectableChannel channel, int interestOps, Object attachment, CompletionHandler completionHandler)
           
 
Methods inherited from class com.sun.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(AbstractNIOTransport transport)
Method Detail

registerChannel

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

registerChannelAsync

public Future<RegisterChannelResult> registerChannelAsync(SelectableChannel channel,
                                                          int interestOps,
                                                          Object attachment,
                                                          CompletionHandler completionHandler)
                                                   throws IOException
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.