| Modifier and Type | Field and Description |
|---|---|
protected boolean |
gracefuleShutdownStarted |
| Modifier | Constructor and Description |
|---|---|
|
Scheduler(@NonNull CheckpointConfig checkpointConfig,
@NonNull CoordinatorConfig coordinatorConfig,
@NonNull LeaseManagementConfig leaseManagementConfig,
@NonNull LifecycleConfig lifecycleConfig,
@NonNull MetricsConfig metricsConfig,
@NonNull ProcessorConfig processorConfig,
@NonNull RetrievalConfig retrievalConfig) |
protected |
Scheduler(@NonNull CheckpointConfig checkpointConfig,
@NonNull CoordinatorConfig coordinatorConfig,
@NonNull LeaseManagementConfig leaseManagementConfig,
@NonNull LifecycleConfig lifecycleConfig,
@NonNull MetricsConfig metricsConfig,
@NonNull ProcessorConfig processorConfig,
@NonNull RetrievalConfig retrievalConfig,
@NonNull software.amazon.kinesis.coordinator.DiagnosticEventFactory diagnosticEventFactory)
Customers do not currently have the ability to customize the DiagnosticEventFactory, but this visibility
is desired for testing.
|
| Modifier and Type | Method and Description |
|---|---|
protected ShardConsumer |
buildConsumer(@NonNull ShardInfo shardInfo,
@NonNull ShardRecordProcessorFactory shardRecordProcessorFactory,
@NonNull LeaseCleanupManager leaseCleanupManager) |
Callable<Boolean> |
createGracefulShutdownCallable()
Creates a callable that will execute the graceful shutdown process.
|
boolean |
hasGracefulShutdownStarted() |
Future<Void> |
requestShutdown()
Deprecated.
|
void |
run()
Start consuming data from the stream, and pass it to the application record processors.
|
void |
shutdown()
Signals worker to shutdown.
|
CompletableFuture<Boolean> |
startGracefulShutdown()
Requests a graceful shutdown of the worker, notifying record processors
of the impending shutdown.
|
public Scheduler(@NonNull
@NonNull CheckpointConfig checkpointConfig,
@NonNull
@NonNull CoordinatorConfig coordinatorConfig,
@NonNull
@NonNull LeaseManagementConfig leaseManagementConfig,
@NonNull
@NonNull LifecycleConfig lifecycleConfig,
@NonNull
@NonNull MetricsConfig metricsConfig,
@NonNull
@NonNull ProcessorConfig processorConfig,
@NonNull
@NonNull RetrievalConfig retrievalConfig)
protected Scheduler(@NonNull
@NonNull CheckpointConfig checkpointConfig,
@NonNull
@NonNull CoordinatorConfig coordinatorConfig,
@NonNull
@NonNull LeaseManagementConfig leaseManagementConfig,
@NonNull
@NonNull LifecycleConfig lifecycleConfig,
@NonNull
@NonNull MetricsConfig metricsConfig,
@NonNull
@NonNull ProcessorConfig processorConfig,
@NonNull
@NonNull RetrievalConfig retrievalConfig,
@NonNull
@NonNull software.amazon.kinesis.coordinator.DiagnosticEventFactory diagnosticEventFactory)
public void run()
public CompletableFuture<Boolean> startGracefulShutdown()
ShutdownReason.LEASE_LOSTpublic Callable<Boolean> createGracefulShutdownCallable()
IllegalStateException - thrown by the callable if another callable has already started the shutdown process.public boolean hasGracefulShutdownStarted()
public void shutdown()
ShutdownReason.LEASE_LOST.protected ShardConsumer buildConsumer(@NonNull @NonNull ShardInfo shardInfo, @NonNull @NonNull ShardRecordProcessorFactory shardRecordProcessorFactory, @NonNull @NonNull LeaseCleanupManager leaseCleanupManager)
@Deprecated public Future<Void> requestShutdown()
Copyright © 2024. All rights reserved.