com.sun.sgs.impl.nio
Class ReactiveChannelGroup.HashingReactorAssignmentStrategy
java.lang.Object
com.sun.sgs.impl.nio.ReactiveChannelGroup.HashingReactorAssignmentStrategy
- All Implemented Interfaces:
- ReactiveChannelGroup.ReactorAssignmentStrategy
- Enclosing class:
- ReactiveChannelGroup
final class ReactiveChannelGroup.HashingReactorAssignmentStrategy
- extends Object
- implements ReactiveChannelGroup.ReactorAssignmentStrategy
A Reactor load balancing strategy that chooses a reactor
based on the hash of the channel.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReactiveChannelGroup.HashingReactorAssignmentStrategy
ReactiveChannelGroup.HashingReactorAssignmentStrategy()
getReactorFor
public Reactor getReactorFor(SelectableChannel channel)
- Returns the
Reactor for a newly-registering channel.
This implementation chooses the reactor based on the hash of the
channel.
- Specified by:
getReactorFor in interface ReactiveChannelGroup.ReactorAssignmentStrategy
- Parameters:
channel - a channel to assign to a Reactor
- Returns:
- the
Reactor to use for the channel
Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved