com.hedera.hashgraph.sdk.proto.ShardID Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: basic_types.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Each shard has a nonnegative shard number. Each realm within a given shard has a nonnegative
* realm number (that number might be reused in other shards). And each account, file, and smart
* contract instance within a given realm has a nonnegative number (which might be reused in other
* realms). Every account, file, and smart contract instance is within exactly one realm. So a
* FileID is a triplet of numbers, like 0.1.2 for entity number 2 within realm 1 within shard 0.
* Each realm maintains a single counter for assigning numbers, so if there is a file with ID
* 0.1.2, then there won't be an account or smart contract instance with ID 0.1.2.
*
* Everything is partitioned into realms so that each Solidity smart contract can access everything
* in just a single realm, locking all those entities while it's running, but other smart contracts
* could potentially run in other realms in parallel. So realms allow Solidity to be parallelized
* somewhat, even though the language itself assumes everything is serial.
*
*
* Protobuf type {@code proto.ShardID}
*/
public final class ShardID extends
com.google.protobuf.GeneratedMessageLite<
ShardID, ShardID.Builder> implements
// @@protoc_insertion_point(message_implements:proto.ShardID)
ShardIDOrBuilder {
private ShardID() {
}
public static final int SHARDNUM_FIELD_NUMBER = 1;
private long shardNum_;
/**
*
**
* the shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @return The shardNum.
*/
@java.lang.Override
public long getShardNum() {
return shardNum_;
}
/**
*
**
* the shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @param value The shardNum to set.
*/
private void setShardNum(long value) {
shardNum_ = value;
}
/**
*
**
* the shard number (nonnegative)
*
*
* int64 shardNum = 1;
*/
private void clearShardNum() {
shardNum_ = 0L;
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.ShardID parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.ShardID prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* Each shard has a nonnegative shard number. Each realm within a given shard has a nonnegative
* realm number (that number might be reused in other shards). And each account, file, and smart
* contract instance within a given realm has a nonnegative number (which might be reused in other
* realms). Every account, file, and smart contract instance is within exactly one realm. So a
* FileID is a triplet of numbers, like 0.1.2 for entity number 2 within realm 1 within shard 0.
* Each realm maintains a single counter for assigning numbers, so if there is a file with ID
* 0.1.2, then there won't be an account or smart contract instance with ID 0.1.2.
*
* Everything is partitioned into realms so that each Solidity smart contract can access everything
* in just a single realm, locking all those entities while it's running, but other smart contracts
* could potentially run in other realms in parallel. So realms allow Solidity to be parallelized
* somewhat, even though the language itself assumes everything is serial.
*
*
* Protobuf type {@code proto.ShardID}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.ShardID, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.ShardID)
com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.ShardID.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* the shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @return The shardNum.
*/
@java.lang.Override
public long getShardNum() {
return instance.getShardNum();
}
/**
*
**
* the shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @param value The shardNum to set.
* @return This builder for chaining.
*/
public Builder setShardNum(long value) {
copyOnWrite();
instance.setShardNum(value);
return this;
}
/**
*
**
* the shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @return This builder for chaining.
*/
public Builder clearShardNum() {
copyOnWrite();
instance.clearShardNum();
return this;
}
// @@protoc_insertion_point(builder_scope:proto.ShardID)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.hedera.hashgraph.sdk.proto.ShardID();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"shardNum_",
};
java.lang.String info =
"\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0002";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.hedera.hashgraph.sdk.proto.ShardID.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:proto.ShardID)
private static final com.hedera.hashgraph.sdk.proto.ShardID DEFAULT_INSTANCE;
static {
ShardID defaultInstance = new ShardID();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ShardID.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.ShardID getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}