Package io.lettuce.core.protocol
Interface Endpoint
-
- All Superinterfaces:
PushHandler
- All Known Implementing Classes:
DefaultEndpoint
,PubSubClusterEndpoint
,PubSubEndpoint
public interface Endpoint extends PushHandler
Wraps a statefulEndpoint
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getId()
void
initialState()
Reset this endpoint to its initial state, clear all buffers and potentially close the bound channel.void
notifyChannelActive(Channel channel)
Notify about channel activation.void
notifyChannelInactive(Channel channel)
Notify about channel deactivation.void
notifyDrainQueuedCommands(io.lettuce.core.protocol.HasQueuedCommands queuedCommands)
Signal the endpoint to drain queued commands from the queue holder.void
notifyException(Throwable t)
Notify about an exception occured in channel/command processingvoid
registerConnectionWatchdog(ConnectionWatchdog connectionWatchdog)
Associate aConnectionWatchdog
with theEndpoint
.-
Methods inherited from interface io.lettuce.core.protocol.PushHandler
addListener, getPushListeners, removeListener
-
-
-
-
Method Detail
-
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 aConnectionWatchdog
with theEndpoint
.- Parameters:
connectionWatchdog
- the connection watchdog.
-
getId
String getId()
- Returns:
- the endpoint Id.
- Since:
- 6.1
-
-