Class StreamShardHandle
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kinesis.model.StreamShardHandle
-
- Direct Known Subclasses:
DynamoDBStreamsShardHandle
@Internal public class StreamShardHandle extends Object
A wrapper class around the information provided along with streamName andShard, with some extra utility methods to determine whether or not a shard is closed and whether or not the shard is a result of parent shard splits or merges.
-
-
Constructor Summary
Constructors Constructor Description StreamShardHandle(String streamName, com.amazonaws.services.kinesis.model.Shard shard)Create a new StreamShardHandle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcompareShardIds(String firstShardId, String secondShardId)Utility function to compare two shard ids.booleanequals(Object obj)com.amazonaws.services.kinesis.model.ShardgetShard()StringgetStreamName()inthashCode()booleanisClosed()StringtoString()
-
-
-
Constructor Detail
-
StreamShardHandle
public StreamShardHandle(String streamName, com.amazonaws.services.kinesis.model.Shard shard)
Create a new StreamShardHandle.- Parameters:
streamName- the name of the Kinesis stream that this shard belongs toshard- the actual AWS Shard instance that will be wrapped within this StreamShardHandle
-
-
Method Detail
-
getStreamName
public String getStreamName()
-
isClosed
public boolean isClosed()
-
getShard
public com.amazonaws.services.kinesis.model.Shard getShard()
-
compareShardIds
public static int compareShardIds(String firstShardId, String secondShardId)
Utility function to compare two shard ids.- Parameters:
firstShardId- first shard id to comparesecondShardId- second shard id to compare- Returns:
- a value less than 0 if the first shard id is smaller than the second shard id, or a value larger than 0 the first shard is larger than the second shard id, or 0 if they are equal
-
-