Class RoundRobinConnectionDistributor

java.lang.Object
org.glassfish.grizzly.nio.AbstractNIOConnectionDistributor
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
  • Constructor Details

    • RoundRobinConnectionDistributor

      public RoundRobinConnectionDistributor(NIOTransport transport)
    • RoundRobinConnectionDistributor

      public RoundRobinConnectionDistributor(NIOTransport transport, boolean useDedicatedAcceptor)
    • RoundRobinConnectionDistributor

      public RoundRobinConnectionDistributor(NIOTransport transport, boolean useDedicatedAcceptor, boolean isServerOnly)
      Constructs RoundRobinConnectionDistributor with the given configuration.
      Parameters:
      transport -
      useDedicatedAcceptor - depending on this flag server Connections, 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.
  • Method Details