Class StatusMessage

java.lang.Object
com.linkedin.venice.status.StatusMessage
Direct Known Subclasses:
KillOfflinePushMessage, StoreStatusMessage

public abstract class StatusMessage extends Object
Venice control message which is used to transfer command and status between storage node and controller, so that controller could control the whole cluster and make the global decision.
  • Field Details

    • messageId

      protected final String messageId
  • Constructor Details

    • StatusMessage

      protected StatusMessage(Map<String,String> fields)
      Create message from given fields map. Should be override in each sub-class.
      Parameters:
      fields -
    • StatusMessage

      protected StatusMessage()
      Default constructor, only used in constructor of sub-class. So visible level is protected but not public.
  • Method Details

    • getMessageId

      public final String getMessageId()
      Get Id of message.
      Returns:
    • getFields

      public Map<String,String> getFields()
      Get K-V paris of all the fields in message.
      Returns:
    • getRequiredField

      protected static String getRequiredField(Map<String,String> fields, String key)
    • getOptionalField

      protected static String getOptionalField(Map<String,String> fields, String key)
    • generateMessageId

      public static String generateMessageId()