public class ShardSyncTask extends Object implements ITask
| Constructor and Description |
|---|
ShardSyncTask(IKinesisProxy kinesisProxy,
ILeaseManager<KinesisClientLease> leaseManager,
InitialPositionInStreamExtended initialPositionInStream,
boolean cleanupLeasesUponShardCompletion,
boolean ignoreUnexpectedChildShards,
long shardSyncTaskIdleTimeMillis,
ShardSyncer shardSyncer,
List<com.amazonaws.services.kinesis.model.Shard> latestShards) |
| Modifier and Type | Method and Description |
|---|---|
TaskResult |
call()
Perform task logic.
|
TaskType |
getTaskType() |
public ShardSyncTask(IKinesisProxy kinesisProxy, ILeaseManager<KinesisClientLease> leaseManager, InitialPositionInStreamExtended initialPositionInStream, boolean cleanupLeasesUponShardCompletion, boolean ignoreUnexpectedChildShards, long shardSyncTaskIdleTimeMillis, ShardSyncer shardSyncer, List<com.amazonaws.services.kinesis.model.Shard> latestShards)
kinesisProxy - Used to fetch information about the stream (e.g. shard list)leaseManager - Used to fetch and create leasesinitialPositionInStream - One of LATEST, TRIM_HORIZON or AT_TIMESTAMP. Amazon Kinesis Client Library will
start processing records from this point in the stream (when an application starts up for the first time)
except for shards that already have a checkpoint (and their descendant shards).cleanupLeasesUponShardCompletion - Clean up shards we've finished processing (don't wait for expiration
in Kinesis)shardSyncTaskIdleTimeMillis - shardSync task idle time in millisshardSyncer - shardSyncer instance used to check and create new leaseslatestShards - latest snapshot of shards to reusepublic TaskResult call()
ITaskcall in interface ITaskcall in interface Callable<TaskResult>public TaskType getTaskType()
getTaskType in interface ITaskCopyright © 2024. All rights reserved.