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
ConstructorsConstructorDescriptionConsumerAction(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, boolean isHelixTriggeredAction) ConsumerAction(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker, boolean isHelixTriggeredAction) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ConsumerAction other) static ConsumerActioncreateKillAction(PubSubTopic topic, int sequenceNumber) Create a kill consumer action.booleanintlongintintgetTopic()getType()inthashCode()voidbooleantoString()
-
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:
compareToin 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.
-