Class Topic.RetentionConfig (1.12.5)

public static final class Topic.RetentionConfig extends GeneratedMessageV3 implements Topic.RetentionConfigOrBuilder

The settings for a topic's message retention.

Protobuf type google.cloud.pubsublite.v1.Topic.RetentionConfig

Static Fields

PERIOD_FIELD_NUMBER

public static final int PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

PER_PARTITION_BYTES_FIELD_NUMBER

public static final int PER_PARTITION_BYTES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Topic.RetentionConfig getDefaultInstance()
Returns
TypeDescription
Topic.RetentionConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Topic.RetentionConfig.Builder newBuilder()
Returns
TypeDescription
Topic.RetentionConfig.Builder

newBuilder(Topic.RetentionConfig prototype)

public static Topic.RetentionConfig.Builder newBuilder(Topic.RetentionConfig prototype)
Parameter
NameDescription
prototypeTopic.RetentionConfig
Returns
TypeDescription
Topic.RetentionConfig.Builder

parseDelimitedFrom(InputStream input)

public static Topic.RetentionConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Topic.RetentionConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Topic.RetentionConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Topic.RetentionConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Topic.RetentionConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Topic.RetentionConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Topic.RetentionConfig> parser()
Returns
TypeDescription
Parser<RetentionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Topic.RetentionConfig getDefaultInstanceForType()
Returns
TypeDescription
Topic.RetentionConfig

getParserForType()

public Parser<Topic.RetentionConfig> getParserForType()
Returns
TypeDescription
Parser<RetentionConfig>
Overrides

getPerPartitionBytes()

public long getPerPartitionBytes()

The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of period.

int64 per_partition_bytes = 1;

Returns
TypeDescription
long

The perPartitionBytes.

getPeriod()

public Duration getPeriod()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
TypeDescription
Duration

The period.

getPeriodOrBuilder()

public DurationOrBuilder getPeriodOrBuilder()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
TypeDescription
DurationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasPeriod()

public boolean hasPeriod()

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below per_partition_bytes.

.google.protobuf.Duration period = 2;

Returns
TypeDescription
boolean

Whether the period field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Topic.RetentionConfig.Builder newBuilderForType()
Returns
TypeDescription
Topic.RetentionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Topic.RetentionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Topic.RetentionConfig.Builder toBuilder()
Returns
TypeDescription
Topic.RetentionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException