Class NettyExecutorProtocolHolder

java.lang.Object
pt.unl.fct.di.novasys.babel2.core.AbstractBabelProtocolHolder
pt.unl.fct.di.novasys.babel2.core.NettyExecutorProtocolHolder
All Implemented Interfaces:
BabelProtocolHolder

public final class NettyExecutorProtocolHolder extends AbstractBabelProtocolHolder
Protocol holder implementation executing protocol event handlers on a Netty EventLoopGroup.

Uses a high-performance lock-free MPSC event queue to serialize event processing on the Netty event loop.

  • Constructor Details

    • NettyExecutorProtocolHolder

      protected NettyExecutorProtocolHolder(BabelProtocol protocol, Set<ProtocolExtension<? extends BabelProtocol>> extensions, io.netty.channel.EventLoopGroup executor, int maxQueueCapacity)
      Constructs a new Netty executor protocol holder.
      Parameters:
      protocol - the managed protocol instance
      extensions - registered protocol extensions
      executor - the Netty event loop group executing event handlers
      maxQueueCapacity - maximum capacity of the internal event queue
  • Method Details

    • deliverEvent

      public void deliverEvent(BabelEvent event)
      Description copied from interface: BabelProtocolHolder
      Enqueues or delivers an event to the underlying protocol.
      Parameters:
      event - the event to deliver