Class DynamoDBStreamsShardDetector
java.lang.Object
com.amazonaws.services.dynamodbv2.streamsadapter.DynamoDBStreamsShardDetector
- All Implemented Interfaces:
software.amazon.kinesis.leases.ShardDetector
public class DynamoDBStreamsShardDetector
extends Object
implements software.amazon.kinesis.leases.ShardDetector
Retrieves a Shard object from the cache based on the provided shardId.
Start │ ▼ Is Cache Empty? ──Yes──► Synchronized Block │ │ No ▼ │ Initialize Cache ▼ Get Shard from Cache │ ▼ Shard Found? ──No──► Increment Cache Misses │ │ Yes ▼ │ Need Refresh? ──Yes──► Synchronized Block │ │ │ │ No ▼ │ │ Refresh Cache │ │ │ │ │ ▼ │ │ Reset Counter │ │ │ ▼ ▼ ▼ Return Shard ◄────────────────────────────────shardId The unique identifier of the shard to retrieve
-
Constructor Summary
ConstructorsConstructorDescriptionDynamoDBStreamsShardDetector(@NonNull software.amazon.awssdk.services.kinesis.KinesisAsyncClient kinesisAsyncClient, @NonNull software.amazon.kinesis.common.StreamIdentifier streamIdentifier, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload, int cacheMissWarningModulus, Duration kinesisRequestTimeout) -
Method Summary
Modifier and TypeMethodDescriptiondescribeStream(String lastSeenShardId, String consumerId) List<software.amazon.awssdk.services.kinesis.model.Shard>List<software.amazon.awssdk.services.kinesis.model.Shard>listShards(String consumerId) software.amazon.awssdk.services.kinesis.model.ShardMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.kinesis.leases.ShardDetector
getChildShards, getListShardsResponse, listShardsWithFilter, listShardsWithFilter, listShardsWithoutConsumingResourceNotFoundException, listShardsWithoutConsumingResourceNotFoundException, streamIdentifier
-
Constructor Details
-
DynamoDBStreamsShardDetector
public DynamoDBStreamsShardDetector(@NonNull @NonNull software.amazon.awssdk.services.kinesis.KinesisAsyncClient kinesisAsyncClient, @NonNull @NonNull software.amazon.kinesis.common.StreamIdentifier streamIdentifier, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload, int cacheMissWarningModulus, Duration kinesisRequestTimeout)
-
-
Method Details
-
shard
- Specified by:
shardin interfacesoftware.amazon.kinesis.leases.ShardDetector
-
listShards
- Specified by:
listShardsin interfacesoftware.amazon.kinesis.leases.ShardDetector
-
listShards
- Specified by:
listShardsin interfacesoftware.amazon.kinesis.leases.ShardDetector
-
describeStream
-