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 aConsumerAction
are defined in theConsumerActionType
enum.
-
-
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 int
compareTo(ConsumerAction other)
static ConsumerAction
createKillAction(PubSubTopic topic, int sequenceNumber)
Create a kill consumer action.boolean
equals(java.lang.Object obj)
int
getAttemptsCount()
long
getCreateTimestampInMs()
java.util.concurrent.CompletableFuture<java.lang.Void>
getFuture()
LeaderFollowerPartitionStateModel.LeaderSessionIdChecker
getLeaderSessionIdChecker()
int
getPartition()
int
getSequenceNumber()
java.lang.String
getTopic()
PubSubTopicPartition
getTopicPartition()
ConsumerActionType
getType()
int
hashCode()
void
incrementAttempt()
boolean
isHelixTriggeredAction()
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(ConsumerAction other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ConsumerAction>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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.
-
-