Class AbstractState

java.lang.Object
org.apache.kafka.connect.health.AbstractState
Direct Known Subclasses:
ConnectorState, TaskState

public abstract class AbstractState extends Object
Provides the current status for a connector or a task, along with an identifier for its Connect worker
  • Constructor Details

    • AbstractState

      public AbstractState(String state, String workerId, String traceMessage)
      Construct a state for a connector or task.
      Parameters:
      state - the status of a connector or task; may not be null or empty
      workerId - the workerId associated with the connector or the task; may not be null or empty
      traceMessage - any error trace message associated with the connector or the task; may be null or empty
  • Method Details

    • state

      public String state()
      Provides the current state of the connector or task.
      Returns:
      state, never null or empty
    • workerId

      public String workerId()
      The identifier of the worker associated with the connector or the task.
      Returns:
      workerId, never null or empty.
    • traceMessage

      public String traceMessage()
      The error message associated with the connector or task.
      Returns:
      traceMessage, can be null or empty.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object