public static class KinesisConsumerStates.InitializingState extends Object implements KinesisConsumerStates.ConsumerState
ShutdownReason.REQUESTEDShutdownNotificationStateShutdownReason.ZOMBIEShuttingDownStateShutdownReason.TERMINATEThis reason should not occur, since terminate is triggered after reaching the end of a shard. Initialize never makes an requests to Kinesis for records, so it can't reach the end of a shard.
Transitions to the ShuttingDownState
| Constructor and Description |
|---|
InitializingState() |
| Modifier and Type | Method and Description |
|---|---|
ITask |
createTask(KinesisShardConsumer consumer)
Creates a new task for this state using the passed in consumer to build the task.
|
KinesisConsumerStates.ShardConsumerState |
getState()
An enumeration represent the type of this state.
|
TaskType |
getTaskType()
The type of task that
KinesisConsumerStates.ConsumerState.createTask(KinesisShardConsumer) would return. |
boolean |
isTerminal() |
KinesisConsumerStates.ConsumerState |
shutdownTransition(ShutdownReason shutdownReason)
Provides the next state of the consumer when a shutdown has been requested.
|
KinesisConsumerStates.ConsumerState |
successTransition()
Provides the next state of the consumer upon success of the task return by
KinesisConsumerStates.ConsumerState.createTask(KinesisShardConsumer). |
public ITask createTask(KinesisShardConsumer consumer)
KinesisConsumerStates.ConsumerStateKinesisConsumerStates.ConsumerState's are allowed to modify the
consumer during the execution of this method.createTask in interface KinesisConsumerStates.ConsumerStateconsumer - the consumer to use build the task, or execute state.public KinesisConsumerStates.ConsumerState successTransition()
KinesisConsumerStates.ConsumerStateKinesisConsumerStates.ConsumerState.createTask(KinesisShardConsumer).successTransition in interface KinesisConsumerStates.ConsumerStatepublic KinesisConsumerStates.ConsumerState shutdownTransition(ShutdownReason shutdownReason)
KinesisConsumerStates.ConsumerStateshutdownTransition in interface KinesisConsumerStates.ConsumerStateshutdownReason - the reason that a shutdown was requestedpublic TaskType getTaskType()
KinesisConsumerStates.ConsumerStateKinesisConsumerStates.ConsumerState.createTask(KinesisShardConsumer) would return. This is always a valid state
even if createTask would return a null value.getTaskType in interface KinesisConsumerStates.ConsumerStatepublic KinesisConsumerStates.ShardConsumerState getState()
KinesisConsumerStates.ConsumerStateKinesisConsumerStates.ShardConsumerState.getState in interface KinesisConsumerStates.ConsumerStatepublic boolean isTerminal()
isTerminal in interface KinesisConsumerStates.ConsumerStateCopyright © 2023. All rights reserved.