Class Topic.RetentionConfig.Builder (1.12.22)

public static final class Topic.RetentionConfig.Builder extends GeneratedMessageV3.Builder<Topic.RetentionConfig.Builder> implements Topic.RetentionConfigOrBuilder

The settings for a topic's message retention.

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Topic.RetentionConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

build()

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

buildPartial()

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

clear()

public Topic.RetentionConfig.Builder clear()
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Topic.RetentionConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Topic.RetentionConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

clearPerPartitionBytes()

public Topic.RetentionConfig.Builder clearPerPartitionBytes()

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
Topic.RetentionConfig.Builder

This builder for chaining.

clearPeriod()

public Topic.RetentionConfig.Builder clearPeriod()

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
Topic.RetentionConfig.Builder

clone()

public Topic.RetentionConfig.Builder clone()
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
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.

getPeriodBuilder()

public Duration.Builder getPeriodBuilder()

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
Builder

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

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Topic.RetentionConfig other)

public Topic.RetentionConfig.Builder mergeFrom(Topic.RetentionConfig other)
Parameter
NameDescription
otherTopic.RetentionConfig
Returns
TypeDescription
Topic.RetentionConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Topic.RetentionConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Topic.RetentionConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

mergePeriod(Duration value)

public Topic.RetentionConfig.Builder mergePeriod(Duration value)

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;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Topic.RetentionConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Topic.RetentionConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Topic.RetentionConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

setPerPartitionBytes(long value)

public Topic.RetentionConfig.Builder setPerPartitionBytes(long value)

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;

Parameter
NameDescription
valuelong

The perPartitionBytes to set.

Returns
TypeDescription
Topic.RetentionConfig.Builder

This builder for chaining.

setPeriod(Duration value)

public Topic.RetentionConfig.Builder setPeriod(Duration value)

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;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Topic.RetentionConfig.Builder

setPeriod(Duration.Builder builderForValue)

public Topic.RetentionConfig.Builder setPeriod(Duration.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Topic.RetentionConfig.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Topic.RetentionConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Topic.RetentionConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Topic.RetentionConfig.Builder
Overrides