Package org.apache.kafka.connect.health
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 along with identifier for Connect worker and tasks.
-
-
Constructor Summary
Constructors Constructor Description AbstractState(String state, String workerId, String traceMessage)
Construct a state for connector or task.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
String
state()
Provides the current state of the connector or task.String
traceMessage()
The error message associated with the connector or task.String
workerId()
The identifier of the worker associated with the connector or the task.
-
-
-
Constructor Detail
-
AbstractState
public AbstractState(String state, String workerId, String traceMessage)
Construct a state for connector or task.- Parameters:
state
- the status of connector or task; may not be null or emptyworkerId
- the workerId associated with the connector or the task; may not be null or emptytraceMessage
- any error trace message associated with the connector or the task; may be null or empty
-
-
Method Detail
-
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.
-
-