com.sun.sgs.impl.nio
Class ReactiveChannelGroup.HashingReactorAssignmentStrategy

java.lang.Object
  extended by 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.


Constructor Summary
ReactiveChannelGroup.HashingReactorAssignmentStrategy()
           
 
Method Summary
 Reactor getReactorFor(SelectableChannel channel)
          Returns the Reactor for a newly-registering channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReactiveChannelGroup.HashingReactorAssignmentStrategy

ReactiveChannelGroup.HashingReactorAssignmentStrategy()
Method Detail

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

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved