Class ConsumerAction
- java.lang.Object
-
- com.linkedin.davinci.kafka.consumer.ConsumerAction
-
- All Implemented Interfaces:
java.lang.Comparable<ConsumerAction>
public class ConsumerAction extends java.lang.Object implements java.lang.Comparable<ConsumerAction>
The class is used to asynchronously trigger behavior changes in theStoreIngestionTask. The kinds of changes that can be triggered by aConsumerActionare defined in theConsumerActionTypeenum.
-
-
Constructor Summary
Constructors Constructor Description ConsumerAction(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, boolean isHelixTriggeredAction)ConsumerAction(ConsumerActionType type, PubSubTopicPartition topicPartition, int sequenceNumber, LeaderFollowerPartitionStateModel.LeaderSessionIdChecker checker, boolean isHelixTriggeredAction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ConsumerAction other)static ConsumerActioncreateKillAction(PubSubTopic topic, int sequenceNumber)Create a kill consumer action.booleanequals(java.lang.Object obj)intgetAttemptsCount()longgetCreateTimestampInMs()java.util.concurrent.CompletableFuture<java.lang.Void>getFuture()LeaderFollowerPartitionStateModel.LeaderSessionIdCheckergetLeaderSessionIdChecker()intgetPartition()intgetSequenceNumber()java.lang.StringgetTopic()PubSubTopicPartitiongetTopicPartition()ConsumerActionTypegetType()inthashCode()voidincrementAttempt()booleanisHelixTriggeredAction()java.lang.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
getType
public ConsumerActionType getType()
-
getTopicPartition
public PubSubTopicPartition getTopicPartition()
-
getTopic
public java.lang.String getTopic()
-
getPartition
public int getPartition()
-
incrementAttempt
public void incrementAttempt()
-
getAttemptsCount
public int getAttemptsCount()
-
getSequenceNumber
public int getSequenceNumber()
-
getLeaderSessionIdChecker
public LeaderFollowerPartitionStateModel.LeaderSessionIdChecker getLeaderSessionIdChecker()
-
getCreateTimestampInMs
public long getCreateTimestampInMs()
-
getFuture
public java.util.concurrent.CompletableFuture<java.lang.Void> getFuture()
-
isHelixTriggeredAction
public boolean isHelixTriggeredAction()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(ConsumerAction other)
- Specified by:
compareToin interfacejava.lang.Comparable<ConsumerAction>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
createKillAction
public static ConsumerAction createKillAction(PubSubTopic topic, int sequenceNumber)
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.
-
-