Module lettuce.core

Interface Endpoint

All Superinterfaces:
PushHandler
All Known Implementing Classes:
DefaultEndpoint, PubSubClusterEndpoint, PubSubEndpoint

public interface Endpoint
extends PushHandler
Wraps a stateful Endpoint that abstracts the underlying channel. Endpoints may be connected, disconnected and in closed states. Endpoints may feature reconnection capabilities with replaying queued commands.
Author:
Mark Paluch
  • Method Details

    • initialState

      void initialState()
      Reset this endpoint to its initial state, clear all buffers and potentially close the bound channel.
      Since:
      5.1
    • notifyChannelActive

      void notifyChannelActive​(Channel channel)
      Notify about channel activation.
      Parameters:
      channel - the channel
    • notifyChannelInactive

      void notifyChannelInactive​(Channel channel)
      Notify about channel deactivation.
      Parameters:
      channel - the channel
    • notifyException

      void notifyException​(Throwable t)
      Notify about an exception occured in channel/command processing
      Parameters:
      t - the Exception
    • notifyDrainQueuedCommands

      void notifyDrainQueuedCommands​(io.lettuce.core.protocol.HasQueuedCommands queuedCommands)
      Signal the endpoint to drain queued commands from the queue holder.
      Parameters:
      queuedCommands - the queue holder.
    • registerConnectionWatchdog

      void registerConnectionWatchdog​(ConnectionWatchdog connectionWatchdog)
      Associate a ConnectionWatchdog with the Endpoint.
      Parameters:
      connectionWatchdog - the connection watchdog.
    • getId

      String getId()
      Returns:
      the endpoint Id.
      Since:
      6.1