Class PartitionAssignment (1.8.0)

public final class PartitionAssignment extends GeneratedMessageV3 implements PartitionAssignmentOrBuilder

PartitionAssignments should not race with acknowledgements. There should be exactly one unacknowledged PartitionAssignment at a time. If not, the client must break the stream.

Protobuf type google.cloud.pubsublite.v1.PartitionAssignment

Static Fields

PARTITIONS_FIELD_NUMBER

public static final int PARTITIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static PartitionAssignment getDefaultInstance()
Returns
TypeDescription
PartitionAssignment

getDescriptor()

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

newBuilder()

public static PartitionAssignment.Builder newBuilder()
Returns
TypeDescription
PartitionAssignment.Builder

newBuilder(PartitionAssignment prototype)

public static PartitionAssignment.Builder newBuilder(PartitionAssignment prototype)
Parameter
NameDescription
prototypePartitionAssignment
Returns
TypeDescription
PartitionAssignment.Builder

parseDelimitedFrom(InputStream input)

public static PartitionAssignment parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PartitionAssignment
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static PartitionAssignment parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
PartitionAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static PartitionAssignment parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
PartitionAssignment
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static PartitionAssignment parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PartitionAssignment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static PartitionAssignment parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
PartitionAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<PartitionAssignment> parser()
Returns
TypeDescription
Parser<PartitionAssignment>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public PartitionAssignment getDefaultInstanceForType()
Returns
TypeDescription
PartitionAssignment

getParserForType()

public Parser<PartitionAssignment> getParserForType()
Returns
TypeDescription
Parser<PartitionAssignment>
Overrides

getPartitions(int index)

public long getPartitions(int index)

The list of partition numbers this subscriber is assigned to.

repeated int64 partitions = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The partitions at the given index.

getPartitionsCount()

public int getPartitionsCount()

The list of partition numbers this subscriber is assigned to.

repeated int64 partitions = 1;

Returns
TypeDescription
int

The count of partitions.

getPartitionsList()

public List<Long> getPartitionsList()

The list of partition numbers this subscriber is assigned to.

repeated int64 partitions = 1;

Returns
TypeDescription
List<Long>

A list containing the partitions.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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 PartitionAssignment.Builder newBuilderForType()
Returns
TypeDescription
PartitionAssignment.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public PartitionAssignment.Builder toBuilder()
Returns
TypeDescription
PartitionAssignment.Builder

writeTo(CodedOutputStream output)

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