Package com.linkedin.venice.status
Interface StatusMessageChannel
-
- All Known Implementing Classes:
HelixStatusMessageChannel
public interface StatusMessageChannel
Channel used to send and receive control message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends StatusMessage>
voidregisterHandler(java.lang.Class<T> clazz, StatusMessageHandler<T> handler)
Register a handler to handle a specific message type.void
sendToController(StatusMessage message)
Send message to controller.void
sendToController(StatusMessage message, int retryCount, long retryDurationMs)
Send message to controller.void
sendToStorageNodes(java.lang.String clusterName, StatusMessage message, java.lang.String resourceName, int retryCount)
Send message to all storage nodes in the given cluster.<T extends StatusMessage>
voidunRegisterHandler(java.lang.Class<T> clazz, StatusMessageHandler<T> handler)
Remove a handler for a specific message type.
-
-
-
Method Detail
-
sendToController
void sendToController(StatusMessage message, int retryCount, long retryDurationMs)
Send message to controller. If met any error during the sending, retry it after retryDurationMs until retry @retryCount times.- Parameters:
message
-retryCount
- retry how many times.retryDurationMs
- the duration between two retries.- Throws:
VeniceException
- Met any errors when sending the message through network.
-
sendToController
void sendToController(StatusMessage message)
Send message to controller.- Throws:
VeniceException
- Met any errors when sending the message through network.
-
sendToStorageNodes
void sendToStorageNodes(java.lang.String clusterName, StatusMessage message, java.lang.String resourceName, int retryCount)
Send message to all storage nodes in the given cluster. If met any error during the sending, retry it after retryDurationMs until retry @retryCount times.
-
registerHandler
<T extends StatusMessage> void registerHandler(java.lang.Class<T> clazz, StatusMessageHandler<T> handler)
Register a handler to handle a specific message type.- Type Parameters:
T
-- Parameters:
clazz
-handler
-
-
unRegisterHandler
<T extends StatusMessage> void unRegisterHandler(java.lang.Class<T> clazz, StatusMessageHandler<T> handler)
Remove a handler for a specific message type.- Type Parameters:
T
-- Parameters:
clazz
-handler
-
-
-