@Generated(value="software.amazon.awssdk:codegen") public class SubscribeToShardEvent extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SubscribeToShardEvent.Builder,SubscribeToShardEvent>, SubscribeToShardEventStream
After you call SubscribeToShard, Kinesis Data Streams sends events of this type over an HTTP/2 connection to your consumer.
| Modifier and Type | Class and Description |
|---|---|
static interface |
SubscribeToShardEvent.Builder |
protected static class |
SubscribeToShardEvent.BuilderImpl |
SubscribeToShardEventStream.EventTypeUNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
SubscribeToShardEvent(SubscribeToShardEvent.BuilderImpl builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(SubscribeToShardResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype of
SubscribeToShardEvent. |
static SubscribeToShardEvent.Builder |
builder() |
List<ChildShard> |
childShards()
The list of the child shards of the current shard, returned only at the end of the current shard.
|
String |
continuationSequenceNumber()
Use this as
SequenceNumber in the next call to SubscribeToShard, with
StartingPosition set to AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. |
SubscribeToShardEvent |
copy(Consumer<? super SubscribeToShardEvent.Builder> modifier) |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasChildShards()
For responses, this returns true if the service returned a value for the ChildShards property.
|
int |
hashCode() |
boolean |
hasRecords()
For responses, this returns true if the service returned a value for the Records property.
|
Long |
millisBehindLatest()
The number of milliseconds the read records are from the tip of the stream, indicating how far behind current
time the consumer is.
|
List<Record> |
records()
|
SubscribeToShardEventStream.EventType |
sdkEventType()
The type of this event.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends SubscribeToShardEvent.Builder> |
serializableBuilderClass() |
SubscribeToShardEvent.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitsubscribeToShardEventBuilderprotected SubscribeToShardEvent(SubscribeToShardEvent.BuilderImpl builder)
public final boolean hasRecords()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Record> records()
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasRecords() method.
public final String continuationSequenceNumber()
Use this as SequenceNumber in the next call to SubscribeToShard, with
StartingPosition set to AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use
ContinuationSequenceNumber for checkpointing because it captures your shard progress even when no
data is written to the shard.
SequenceNumber in the next call to SubscribeToShard, with
StartingPosition set to AT_SEQUENCE_NUMBER or
AFTER_SEQUENCE_NUMBER. Use ContinuationSequenceNumber for checkpointing because
it captures your shard progress even when no data is written to the shard.public final Long millisBehindLatest()
The number of milliseconds the read records are from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.
public final boolean hasChildShards()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<ChildShard> childShards()
The list of the child shards of the current shard, returned only at the end of the current shard.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasChildShards() method.
public SubscribeToShardEvent.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<SubscribeToShardEvent.Builder,SubscribeToShardEvent>public static SubscribeToShardEvent.Builder builder()
public static Class<? extends SubscribeToShardEvent.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final SubscribeToShardEvent copy(Consumer<? super SubscribeToShardEvent.Builder> modifier)
copy in interface ToCopyableBuilder<SubscribeToShardEvent.Builder,SubscribeToShardEvent>public SubscribeToShardEventStream.EventType sdkEventType()
SubscribeToShardEventStream:event-type header on the Message.sdkEventType in interface SubscribeToShardEventStreampublic void accept(SubscribeToShardResponseHandler.Visitor visitor)
SubscribeToShardEvent.accept in interface SubscribeToShardEventStreamvisitor - Visitor to invoke.Copyright © 2023. All rights reserved.