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
Modifier and TypeMethodDescription<T extends StatusMessage>
voidregisterHandler
(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
(String clusterName, StatusMessage message, String resourceName, int retryCount) Send message to all storage nodes in the given cluster.<T extends StatusMessage>
voidunRegisterHandler
(Class<T> clazz, StatusMessageHandler<T> handler) Remove a handler for a specific message type.
-
Method Details
-
sendToController
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
Send message to controller.- Throws:
VeniceException
- Met any errors when sending the message through network.
-
sendToStorageNodes
void sendToStorageNodes(String clusterName, StatusMessage message, 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
Register a handler to handle a specific message type.- Type Parameters:
T
-- Parameters:
clazz
-handler
-
-
unRegisterHandler
Remove a handler for a specific message type.- Type Parameters:
T
-- Parameters:
clazz
-handler
-
-