Class ConsumerAction
java.lang.Object
com.linkedin.davinci.kafka.consumer.ConsumerAction
- All Implemented Interfaces:
Comparable<ConsumerAction>
The class is used to asynchronously trigger behavior changes in the
StoreIngestionTask
.
The kinds of changes that can be triggered by a ConsumerAction
are defined in the
ConsumerActionType
enum.-
Constructor Summary
ConstructorDescriptionConsumerAction
(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, boolean isHelixTriggeredAction) ConsumerAction
(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker, boolean isHelixTriggeredAction) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ConsumerAction other) static ConsumerAction
createKillAction
(PubSubTopic topic, int sequenceNumber) Create a kill consumer action.boolean
int
long
int
int
getTopic()
getType()
int
hashCode()
void
boolean
toString()
-
Constructor Details
-
ConsumerAction
public ConsumerAction(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, boolean isHelixTriggeredAction) -
ConsumerAction
public ConsumerAction(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker, boolean isHelixTriggeredAction)
-
-
Method Details
-
getType
-
getTopicPartition
-
getTopic
-
getPartition
public int getPartition() -
incrementAttempt
public void incrementAttempt() -
getAttemptsCount
public int getAttemptsCount() -
getSequenceNumber
public int getSequenceNumber() -
getLeaderSessionIdChecker
-
getCreateTimestampInMs
public long getCreateTimestampInMs() -
getFuture
-
isHelixTriggeredAction
public boolean isHelixTriggeredAction() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ConsumerAction>
-
equals
-
hashCode
public int hashCode() -
createKillAction
Create a kill consumer action. As kill action apply on all of partitions in given topic, so use 0 as partition value for no meaning.
-