Class Topic.RetentionConfig (1.14.7)

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
Type Description
int

PER_PARTITION_BYTES_FIELD_NUMBER

public static final int PER_PARTITION_BYTES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Topic.RetentionConfig getDefaultInstance()
Returns
Type Description
Topic.RetentionConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Topic.RetentionConfig.Builder newBuilder()
Returns
Type Description
Topic.RetentionConfig.Builder

newBuilder(Topic.RetentionConfig prototype)

public static Topic.RetentionConfig.Builder newBuilder(Topic.RetentionConfig prototype)
Parameter
Name Description
prototype Topic.RetentionConfig
Returns
Type Description
Topic.RetentionConfig.Builder

parseDelimitedFrom(InputStream input)

public static Topic.RetentionConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Topic.RetentionConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Topic.RetentionConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Topic.RetentionConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Topic.RetentionConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Topic.RetentionConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Topic.RetentionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Topic.RetentionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Topic.RetentionConfig getDefaultInstanceForType()
Returns
Type Description
Topic.RetentionConfig

getParserForType()

public Parser<Topic.RetentionConfig> getParserForType()
Returns
Type Description
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
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
Type Description
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
Type Description
DurationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
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
Type Description
boolean

Whether the period field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Topic.RetentionConfig.Builder newBuilderForType()
Returns
Type Description
Topic.RetentionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Topic.RetentionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Topic.RetentionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Topic.RetentionConfig.Builder toBuilder()
Returns
Type Description
Topic.RetentionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException