public class StreamIdentifier extends Object
Constructor and Description |
---|
StreamIdentifier() |
Modifier and Type | Method and Description |
---|---|
static StreamIdentifier |
multiStreamInstance(software.amazon.awssdk.arns.Arn streamArn,
long creationEpoch)
Create a multi stream instance for StreamIdentifier from stream
Arn . |
static StreamIdentifier |
multiStreamInstance(String streamIdentifierSer)
Create a multi stream instance for StreamIdentifier from serialized stream identifier
of format
STREAM_IDENTIFIER_PATTERN |
String |
serialize()
Serialize the current StreamIdentifier instance.
|
static StreamIdentifier |
singleStreamInstance(software.amazon.awssdk.arns.Arn streamArn)
Create a single stream instance for StreamIdentifier from AWS Kinesis stream
Arn . |
static StreamIdentifier |
singleStreamInstance(String streamName)
Create a single stream instance for StreamIdentifier from stream name.
|
String |
toString() |
static void |
validateArn(software.amazon.awssdk.arns.Arn streamArn)
Verify the streamArn follows the appropriate formatting.
|
public String serialize()
account:stream:creationEpoch
in multi-stream mode
or streamName
in single-stream mode.public static StreamIdentifier multiStreamInstance(String streamIdentifierSer)
STREAM_IDENTIFIER_PATTERN
streamIdentifierSer
- a String of account:stream:creationEpoch
accountIdOptional
and streamCreationEpochOptional
presentpublic static StreamIdentifier multiStreamInstance(software.amazon.awssdk.arns.Arn streamArn, long creationEpoch)
Arn
.streamArn
- an Arn
of format STREAM_ARN_PATTERN
creationEpoch
- Creation epoch of the stream. This value will
reflect in the lease key and is assumed to be correct. (KCL could
verify, but that creates issues for both bootstrapping and, with large
KCL applications, API throttling against DescribeStreamSummary.)
If this epoch is reused for two identically-named streams in the same
account -- such as deleting and recreating a stream -- then KCL will
be unable to differentiate leases between the old and new stream
since the lease keys collide on this creation epoch.accountIdOptional
, streamCreationEpochOptional
,
and streamArnOptional
presentpublic static StreamIdentifier singleStreamInstance(String streamName)
streamName
- stream name of a Kinesis streampublic static StreamIdentifier singleStreamInstance(software.amazon.awssdk.arns.Arn streamArn)
Arn
.streamArn
- AWS ARN of a Kinesis streamaccountIdOptional
and streamArnOptional
presentpublic static void validateArn(software.amazon.awssdk.arns.Arn streamArn)
streamArn
- Copyright © 2025. All rights reserved.