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
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Topic.RetentionConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public Topic.RetentionConfig build()
Returns
buildPartial()
public Topic.RetentionConfig buildPartial()
Returns
clear()
public Topic.RetentionConfig.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Topic.RetentionConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Topic.RetentionConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
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
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
clone()
public Topic.RetentionConfig.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public Topic.RetentionConfig getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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
Type | Description |
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
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
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
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
Type | Description |
boolean | Whether the period field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Topic.RetentionConfig other)
public Topic.RetentionConfig.Builder mergeFrom(Topic.RetentionConfig other)
Parameter
Returns
public Topic.RetentionConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Topic.RetentionConfig.Builder mergeFrom(Message other)
Parameter
Returns
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
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Topic.RetentionConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public Topic.RetentionConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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
Name | Description |
value | long
The perPartitionBytes to set.
|
Returns
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
Returns
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
Name | Description |
builderForValue | Builder
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Topic.RetentionConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Topic.RetentionConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides