checkAndCreateLeasesForNewShards
public void checkAndCreateLeasesForNewShards(com.amazonaws.services.kinesis.clientlibrary.proxies.IKinesisProxy kinesisProxy,
com.amazonaws.services.kinesis.leases.interfaces.ILeaseManager<com.amazonaws.services.kinesis.leases.impl.KinesisClientLease> leaseManager,
com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStreamExtended initialPositionInStream,
boolean cleanupLeasesOfCompletedShards,
boolean ignoreUnexpectedChildShards)
throws com.amazonaws.services.kinesis.leases.exceptions.DependencyException,
com.amazonaws.services.kinesis.leases.exceptions.InvalidStateException,
com.amazonaws.services.kinesis.leases.exceptions.ProvisionedThroughputException,
com.amazonaws.services.kinesis.clientlibrary.exceptions.internal.KinesisClientLibIOException
Check and create leases for any new shards (e.g. following a reshard operation).
- Specified by:
checkAndCreateLeasesForNewShards in interface com.amazonaws.services.kinesis.clientlibrary.lib.worker.ShardSyncer
- Parameters:
kinesisProxy - Implementation of IKinesisProxy that would read from the underlying Stream
leaseManager - Performs data operations on the leases table.
initialPositionInStream - Position in Stream from which to start processing.
cleanupLeasesOfCompletedShards - Whether or not leases of completed shards should be processed for deletion
from leases table. Leases for shards are deleted once their children shards
have been completely processed.
ignoreUnexpectedChildShards - Ignore some consistency checks on the shard graph.
- Throws:
com.amazonaws.services.kinesis.leases.exceptions.DependencyException - Thrown when one of the dependencies throws an exception
com.amazonaws.services.kinesis.leases.exceptions.InvalidStateException - Unexpected state, e.g. if the leases table does not exist.
com.amazonaws.services.kinesis.leases.exceptions.ProvisionedThroughputException - Thrown on being throttled from leases table.
com.amazonaws.services.kinesis.clientlibrary.exceptions.internal.KinesisClientLibIOException - Wrapper for various exceptions thrown from KCL