public class ShardInfo extends Object
| Constructor and Description |
|---|
ShardInfo(String shardId,
String concurrencyToken,
Collection<String> parentShardIds,
ExtendedSequenceNumber checkpoint)
Creates a new ShardInfo object.
|
ShardInfo(String shardId,
String concurrencyToken,
Collection<String> parentShardIds,
ExtendedSequenceNumber checkpoint,
String streamIdentifierSer)
Creates a new ShardInfo object that has an option to pass a serialized streamIdentifier.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
This method assumes parentShardIds is ordered.
|
static String |
getLeaseKey(ShardInfo shardInfo)
Utility method to derive lease key from ShardInfo.
|
static String |
getLeaseKey(ShardInfo shardInfo,
String shardIdOverride)
Utility method to derive lease key from ShardInfo and shardId to override.
|
int |
hashCode() |
boolean |
isCompleted()
Whether the shard has been completely processed or not.
|
List<String> |
parentShardIds()
A list of shards that are parents of this shard.
|
public ShardInfo(@NonNull
String shardId,
String concurrencyToken,
Collection<String> parentShardIds,
ExtendedSequenceNumber checkpoint)
shardId - Kinesis shardId that this will be aboutconcurrencyToken - Used to differentiate between lost and reclaimed leasesparentShardIds - Parent shards of the shard identified by Kinesis shardIdcheckpoint - the latest checkpoint from leasepublic ShardInfo(@NonNull
String shardId,
String concurrencyToken,
Collection<String> parentShardIds,
ExtendedSequenceNumber checkpoint,
String streamIdentifierSer)
shardId - concurrencyToken - parentShardIds - checkpoint - streamIdentifierSer - public List<String> parentShardIds()
public boolean isCompleted()
public boolean equals(Object obj)
public static String getLeaseKey(ShardInfo shardInfo)
shardInfo - Copyright © 2021. All rights reserved.