public final class Snapshot extends GeneratedMessageV3 implements SnapshotOrBuilder
A snapshot resource. Snapshots are used in
Seek
operations, which allow you to manage message acknowledgments in bulk. That
is, you can set the acknowledgment state of messages in an existing
subscription to the state captured by a snapshot.
Protobuf type google.pubsub.v1.Snapshot
Static Fields
EXPIRE_TIME_FIELD_NUMBER
public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
TOPIC_FIELD_NUMBER
public static final int TOPIC_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Snapshot getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Snapshot.Builder newBuilder()
Returns
newBuilder(Snapshot prototype)
public static Snapshot.Builder newBuilder(Snapshot prototype)
Parameter
Returns
public static Snapshot parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Snapshot parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Snapshot parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Snapshot parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Snapshot parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Snapshot parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Snapshot parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Snapshot parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Snapshot parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Snapshot parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Snapshot parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Snapshot parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Snapshot> parser()
Returns
Methods
containsLabels(String key)
public boolean containsLabels(String key)
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public Snapshot getDefaultInstanceForType()
Returns
getExpireTime()
public Timestamp getExpireTime()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
getExpireTimeOrBuilder()
public TimestampOrBuilder getExpireTimeOrBuilder()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
getLabels()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
Returns
getLabelsMap()
public Map<String,String> getLabelsMap()
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Parameter
Returns
getName()
The name of the snapshot.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
The name of the snapshot.
string name = 1;
Returns
getParserForType()
public Parser<Snapshot> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getTopic()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
String | The topic.
|
getTopicBytes()
public ByteString getTopicBytes()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasExpireTime()
public boolean hasExpireTime()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
Type | Description |
boolean | Whether the expireTime field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Snapshot.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Snapshot.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Snapshot.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions