public class ShardConsumer extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_TIME_BETWEEN_REQUEST_RESPONSE |
Constructor and Description |
---|
ShardConsumer(RecordsPublisher recordsPublisher,
ExecutorService executorService,
ShardInfo shardInfo,
Optional<Long> logWarningForTaskAfterMillis,
ShardConsumerArgument shardConsumerArgument,
software.amazon.kinesis.lifecycle.ConsumerState initialState,
Function<ConsumerTask,ConsumerTask> taskMetricsDecorator,
int bufferSize,
TaskExecutionListener taskExecutionListener)
Deprecated.
|
ShardConsumer(RecordsPublisher recordsPublisher,
ExecutorService executorService,
ShardInfo shardInfo,
Optional<Long> logWarningForTaskAfterMillis,
ShardConsumerArgument shardConsumerArgument,
software.amazon.kinesis.lifecycle.ConsumerState initialState,
Function<ConsumerTask,ConsumerTask> taskMetricsDecorator,
int bufferSize,
TaskExecutionListener taskExecutionListener,
int readTimeoutsToIgnoreBeforeWarning) |
ShardConsumer(RecordsPublisher recordsPublisher,
ExecutorService executorService,
ShardInfo shardInfo,
Optional<Long> logWarningForTaskAfterMillis,
ShardConsumerArgument shardConsumerArgument,
TaskExecutionListener taskExecutionListener)
Deprecated.
|
ShardConsumer(RecordsPublisher recordsPublisher,
ExecutorService executorService,
ShardInfo shardInfo,
Optional<Long> logWarningForTaskAfterMillis,
ShardConsumerArgument shardConsumerArgument,
TaskExecutionListener taskExecutionListener,
int readTimeoutsToIgnoreBeforeWarning) |
Modifier and Type | Method and Description |
---|---|
void |
executeLifecycle() |
void |
gracefulShutdown(ShutdownNotification shutdownNotification)
Requests the shutdown of the this ShardConsumer.
|
boolean |
isShutdown()
Used (by Worker) to check if this ShardConsumer instance has been shutdown
ShardRecordProcessor shutdown() has been invoked, as appropriate.
|
boolean |
isShutdownRequested() |
boolean |
leaseLost()
Shutdown this ShardConsumer (including invoking the ShardRecordProcessor shutdown API).
|
public static final int MAX_TIME_BETWEEN_REQUEST_RESPONSE
@Deprecated public ShardConsumer(RecordsPublisher recordsPublisher, ExecutorService executorService, ShardInfo shardInfo, Optional<Long> logWarningForTaskAfterMillis, ShardConsumerArgument shardConsumerArgument, TaskExecutionListener taskExecutionListener)
public ShardConsumer(RecordsPublisher recordsPublisher, ExecutorService executorService, ShardInfo shardInfo, Optional<Long> logWarningForTaskAfterMillis, ShardConsumerArgument shardConsumerArgument, TaskExecutionListener taskExecutionListener, int readTimeoutsToIgnoreBeforeWarning)
@Deprecated public ShardConsumer(RecordsPublisher recordsPublisher, ExecutorService executorService, ShardInfo shardInfo, Optional<Long> logWarningForTaskAfterMillis, ShardConsumerArgument shardConsumerArgument, software.amazon.kinesis.lifecycle.ConsumerState initialState, Function<ConsumerTask,ConsumerTask> taskMetricsDecorator, int bufferSize, TaskExecutionListener taskExecutionListener)
public ShardConsumer(RecordsPublisher recordsPublisher, ExecutorService executorService, ShardInfo shardInfo, Optional<Long> logWarningForTaskAfterMillis, ShardConsumerArgument shardConsumerArgument, software.amazon.kinesis.lifecycle.ConsumerState initialState, Function<ConsumerTask,ConsumerTask> taskMetricsDecorator, int bufferSize, TaskExecutionListener taskExecutionListener, int readTimeoutsToIgnoreBeforeWarning)
public void executeLifecycle()
public void gracefulShutdown(ShutdownNotification shutdownNotification)
shutdownNotification
- used to signal that the record processor has been given the chance to shutdown.public boolean leaseLost()
public boolean isShutdown()
public boolean isShutdownRequested()
Copyright © 2021. All rights reserved.