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
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 Details
-
AbstractState
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 Details
-
state
Provides the current state of the connector or task.- Returns:
- state, never
null
or empty
-
workerId
The identifier of the worker associated with the connector or the task.- Returns:
- workerId, never
null
or empty.
-
traceMessage
The error message associated with the connector or task.- Returns:
- traceMessage, can be
null
or empty.
-
equals
-
hashCode
public int hashCode()
-