Interface StatusMessageChannel

  • All Known Implementing Classes:
    HelixStatusMessageChannel

    public interface StatusMessageChannel
    Channel used to send and receive control message.
    • 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 -