Class OperationChannel

java.lang.Object
org.infinispan.client.hotrod.impl.transport.netty.OperationChannel
All Implemented Interfaces:
io.netty.util.internal.shaded.org.jctools.queues.MessagePassingQueue.Consumer<HotRodOperation<?>>

public class OperationChannel extends Object implements io.netty.util.internal.shaded.org.jctools.queues.MessagePassingQueue.Consumer<HotRodOperation<?>>
  • Field Details

    • OPERATION_CHANNEL_ATTRIBUTE_KEY

      public static final io.netty.util.AttributeKey<OperationChannel> OPERATION_CHANNEL_ATTRIBUTE_KEY
  • Method Details

    • createAndStart

      public static OperationChannel createAndStart(SocketAddress address, org.infinispan.client.hotrod.impl.transport.netty.ChannelInitializer newChannelInvoker, Function<String,ClientTopology> currentCacheTopologyFunction, BiConsumer<OperationChannel,Throwable> connectionFailureListener)
    • setCodec

      public void setCodec(Codec codec)
    • isAcceptingRequests

      public boolean isAcceptingRequests()
    • markAcceptingRequests

      public void markAcceptingRequests()
    • forceSendOperation

      public void forceSendOperation(HotRodOperation<?> operation)
      Allows sending a command directly without enqueuing. Note that this method should only be invoked after the channel has been started and notified via the ActivationHandler.ACTIVATION_EVENT and after all netty channel handlers have been ChannelInboundHandler.channelActive(ChannelHandlerContext).
      Parameters:
      operation - operation to send immediately, usually for login purposes
    • sendOperation

      public void sendOperation(HotRodOperation<?> operation)
    • reconnect

      public Iterable<HotRodOperation<?>> reconnect(Throwable t)
    • getAddress

      public SocketAddress getAddress()
    • accept

      public void accept(HotRodOperation<?> operation)
      Specified by:
      accept in interface io.netty.util.internal.shaded.org.jctools.queues.MessagePassingQueue.Consumer<HotRodOperation<?>>
    • pendingChannelOperations

      public Queue<HotRodOperation<?>> pendingChannelOperations()
    • close

      public List<HotRodOperation<?>> close()
    • getChannel

      public io.netty.channel.Channel getChannel()
    • toString

      public String toString()
      Overrides:
      toString in class Object