Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* KVRWSet encapsulates the read-write set for a chaincode that operates upon a KV or Document data model
* This structure is used for both the public data and the private data
*
*
* Protobuf type {@code kvrwset.KVRWSet}
*/
public static final class KVRWSet extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.KVRWSet)
KVRWSetOrBuilder {
// Use KVRWSet.newBuilder() to construct.
private KVRWSet(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private KVRWSet() {
reads_ = java.util.Collections.emptyList();
rangeQueriesInfo_ = java.util.Collections.emptyList();
writes_ = java.util.Collections.emptyList();
metadataWrites_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KVRWSet(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
reads_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
reads_.add(
input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRead.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
rangeQueriesInfo_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
rangeQueriesInfo_.add(
input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
writes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
writes_.add(
input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWrite.parser(), extensionRegistry));
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
metadataWrites_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
metadataWrites_.add(
input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataWrite.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
reads_ = java.util.Collections.unmodifiableList(reads_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
rangeQueriesInfo_ = java.util.Collections.unmodifiableList(rangeQueriesInfo_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
writes_ = java.util.Collections.unmodifiableList(writes_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
metadataWrites_ = java.util.Collections.unmodifiableList(metadataWrites_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVRWSet_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVRWSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet.Builder.class);
}
public static final int READS_FIELD_NUMBER = 1;
private java.util.List reads_;
/**
* repeated .kvrwset.KVRead reads = 1;
*/
public java.util.List getReadsList() {
return reads_;
}
/**
* repeated .kvrwset.KVRead reads = 1;
*/
public java.util.List
getReadsOrBuilderList() {
return reads_;
}
/**
* repeated .kvrwset.KVRead reads = 1;
*/
public int getReadsCount() {
return reads_.size();
}
/**
* repeated .kvrwset.KVRead reads = 1;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRead getReads(int index) {
return reads_.get(index);
}
/**
* repeated .kvrwset.KVRead reads = 1;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadOrBuilder getReadsOrBuilder(
int index) {
return reads_.get(index);
}
public static final int RANGE_QUERIES_INFO_FIELD_NUMBER = 2;
private java.util.List rangeQueriesInfo_;
/**
* repeated .kvrwset.RangeQueryInfo range_queries_info = 2;
*/
public java.util.List getRangeQueriesInfoList() {
return rangeQueriesInfo_;
}
/**
* repeated .kvrwset.RangeQueryInfo range_queries_info = 2;
*/
public java.util.List
getRangeQueriesInfoOrBuilderList() {
return rangeQueriesInfo_;
}
/**
* repeated .kvrwset.RangeQueryInfo range_queries_info = 2;
*/
public int getRangeQueriesInfoCount() {
return rangeQueriesInfo_.size();
}
/**
* repeated .kvrwset.RangeQueryInfo range_queries_info = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo getRangeQueriesInfo(int index) {
return rangeQueriesInfo_.get(index);
}
/**
* repeated .kvrwset.RangeQueryInfo range_queries_info = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfoOrBuilder getRangeQueriesInfoOrBuilder(
int index) {
return rangeQueriesInfo_.get(index);
}
public static final int WRITES_FIELD_NUMBER = 3;
private java.util.List writes_;
/**
* repeated .kvrwset.KVWrite writes = 3;
*/
public java.util.List getWritesList() {
return writes_;
}
/**
* repeated .kvrwset.KVWrite writes = 3;
*/
public java.util.List
getWritesOrBuilderList() {
return writes_;
}
/**
* repeated .kvrwset.KVWrite writes = 3;
*/
public int getWritesCount() {
return writes_.size();
}
/**
* repeated .kvrwset.KVWrite writes = 3;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWrite getWrites(int index) {
return writes_.get(index);
}
/**
* repeated .kvrwset.KVWrite writes = 3;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteOrBuilder getWritesOrBuilder(
int index) {
return writes_.get(index);
}
public static final int METADATA_WRITES_FIELD_NUMBER = 4;
private java.util.List metadataWrites_;
/**
* repeated .kvrwset.KVMetadataWrite metadata_writes = 4;
*/
public java.util.List getMetadataWritesList() {
return metadataWrites_;
}
/**
* repeated .kvrwset.KVMetadataWrite metadata_writes = 4;
*/
public java.util.List
getMetadataWritesOrBuilderList() {
return metadataWrites_;
}
/**
* repeated .kvrwset.KVMetadataWrite metadata_writes = 4;
*/
public int getMetadataWritesCount() {
return metadataWrites_.size();
}
/**
* repeated .kvrwset.KVMetadataWrite metadata_writes = 4;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataWrite getMetadataWrites(int index) {
return metadataWrites_.get(index);
}
/**
* repeated .kvrwset.KVMetadataWrite metadata_writes = 4;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataWriteOrBuilder getMetadataWritesOrBuilder(
int index) {
return metadataWrites_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < reads_.size(); i++) {
output.writeMessage(1, reads_.get(i));
}
for (int i = 0; i < rangeQueriesInfo_.size(); i++) {
output.writeMessage(2, rangeQueriesInfo_.get(i));
}
for (int i = 0; i < writes_.size(); i++) {
output.writeMessage(3, writes_.get(i));
}
for (int i = 0; i < metadataWrites_.size(); i++) {
output.writeMessage(4, metadataWrites_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < reads_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, reads_.get(i));
}
for (int i = 0; i < rangeQueriesInfo_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, rangeQueriesInfo_.get(i));
}
for (int i = 0; i < writes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, writes_.get(i));
}
for (int i = 0; i < metadataWrites_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, metadataWrites_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet) obj;
boolean result = true;
result = result && getReadsList()
.equals(other.getReadsList());
result = result && getRangeQueriesInfoList()
.equals(other.getRangeQueriesInfoList());
result = result && getWritesList()
.equals(other.getWritesList());
result = result && getMetadataWritesList()
.equals(other.getMetadataWritesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getReadsCount() > 0) {
hash = (37 * hash) + READS_FIELD_NUMBER;
hash = (53 * hash) + getReadsList().hashCode();
}
if (getRangeQueriesInfoCount() > 0) {
hash = (37 * hash) + RANGE_QUERIES_INFO_FIELD_NUMBER;
hash = (53 * hash) + getRangeQueriesInfoList().hashCode();
}
if (getWritesCount() > 0) {
hash = (37 * hash) + WRITES_FIELD_NUMBER;
hash = (53 * hash) + getWritesList().hashCode();
}
if (getMetadataWritesCount() > 0) {
hash = (37 * hash) + METADATA_WRITES_FIELD_NUMBER;
hash = (53 * hash) + getMetadataWritesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVRWSet prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* KVRWSet encapsulates the read-write set for a chaincode that operates upon a KV or Document data model
* This structure is used for both the public data and the private data
*
* KVReadHash is similar to the KVRead in spirit. However, it captures the hash of the key instead of the key itself
* version is kept as is for now. However, if the version also needs to be privacy-protected, it would need to be the
* hash of the version and hence of 'bytes' type
*
*
* Protobuf type {@code kvrwset.KVReadHash}
*/
public static final class KVReadHash extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.KVReadHash)
KVReadHashOrBuilder {
// Use KVReadHash.newBuilder() to construct.
private KVReadHash(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private KVReadHash() {
keyHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KVReadHash(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
keyHash_ = input.readBytes();
break;
}
case 18: {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder subBuilder = null;
if (version_ != null) {
subBuilder = version_.toBuilder();
}
version_ = input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(version_);
version_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVReadHash_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVReadHash_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.Builder.class);
}
public static final int KEY_HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString keyHash_;
/**
* optional bytes key_hash = 1;
*/
public com.google.protobuf.ByteString getKeyHash() {
return keyHash_;
}
public static final int VERSION_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version version_;
/**
* optional .kvrwset.Version version = 2;
*/
public boolean hasVersion() {
return version_ != null;
}
/**
* optional .kvrwset.Version version = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version getVersion() {
return version_ == null ? org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.getDefaultInstance() : version_;
}
/**
* optional .kvrwset.Version version = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.VersionOrBuilder getVersionOrBuilder() {
return getVersion();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!keyHash_.isEmpty()) {
output.writeBytes(1, keyHash_);
}
if (version_ != null) {
output.writeMessage(2, getVersion());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!keyHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, keyHash_);
}
if (version_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getVersion());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash) obj;
boolean result = true;
result = result && getKeyHash()
.equals(other.getKeyHash());
result = result && (hasVersion() == other.hasVersion());
if (hasVersion()) {
result = result && getVersion()
.equals(other.getVersion());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + KEY_HASH_FIELD_NUMBER;
hash = (53 * hash) + getKeyHash().hashCode();
if (hasVersion()) {
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* KVReadHash is similar to the KVRead in spirit. However, it captures the hash of the key instead of the key itself
* version is kept as is for now. However, if the version also needs to be privacy-protected, it would need to be the
* hash of the version and hence of 'bytes' type
*
*
* Protobuf type {@code kvrwset.KVReadHash}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:kvrwset.KVReadHash)
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHashOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVReadHash_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVReadHash_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
keyHash_ = com.google.protobuf.ByteString.EMPTY;
if (versionBuilder_ == null) {
version_ = null;
} else {
version_ = null;
versionBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVReadHash_descriptor;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.getDefaultInstance();
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash build() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash buildPartial() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash result = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash(this);
result.keyHash_ = keyHash_;
if (versionBuilder_ == null) {
result.version_ = version_;
} else {
result.version_ = versionBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash) {
return mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash other) {
if (other == org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash.getDefaultInstance()) return this;
if (other.getKeyHash() != com.google.protobuf.ByteString.EMPTY) {
setKeyHash(other.getKeyHash());
}
if (other.hasVersion()) {
mergeVersion(other.getVersion());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString keyHash_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes key_hash = 1;
*/
public com.google.protobuf.ByteString getKeyHash() {
return keyHash_;
}
/**
* optional bytes key_hash = 1;
*/
public Builder setKeyHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
keyHash_ = value;
onChanged();
return this;
}
/**
* optional bytes key_hash = 1;
*/
public Builder clearKeyHash() {
keyHash_ = getDefaultInstance().getKeyHash();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version version_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.VersionOrBuilder> versionBuilder_;
/**
* optional .kvrwset.Version version = 2;
*/
public boolean hasVersion() {
return versionBuilder_ != null || version_ != null;
}
/**
* optional .kvrwset.Version version = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version getVersion() {
if (versionBuilder_ == null) {
return version_ == null ? org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.getDefaultInstance() : version_;
} else {
return versionBuilder_.getMessage();
}
}
/**
* optional .kvrwset.Version version = 2;
*/
public Builder setVersion(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version value) {
if (versionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
} else {
versionBuilder_.setMessage(value);
}
return this;
}
/**
* optional .kvrwset.Version version = 2;
*/
public Builder setVersion(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder builderForValue) {
if (versionBuilder_ == null) {
version_ = builderForValue.build();
onChanged();
} else {
versionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* optional .kvrwset.Version version = 2;
*/
public Builder mergeVersion(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version value) {
if (versionBuilder_ == null) {
if (version_ != null) {
version_ =
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.newBuilder(version_).mergeFrom(value).buildPartial();
} else {
version_ = value;
}
onChanged();
} else {
versionBuilder_.mergeFrom(value);
}
return this;
}
/**
* optional .kvrwset.Version version = 2;
*/
public Builder clearVersion() {
if (versionBuilder_ == null) {
version_ = null;
onChanged();
} else {
version_ = null;
versionBuilder_ = null;
}
return this;
}
/**
* optional .kvrwset.Version version = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder getVersionBuilder() {
onChanged();
return getVersionFieldBuilder().getBuilder();
}
/**
* optional .kvrwset.Version version = 2;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.VersionOrBuilder getVersionOrBuilder() {
if (versionBuilder_ != null) {
return versionBuilder_.getMessageOrBuilder();
} else {
return version_ == null ?
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.getDefaultInstance() : version_;
}
}
/**
* optional .kvrwset.Version version = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.VersionOrBuilder>
getVersionFieldBuilder() {
if (versionBuilder_ == null) {
versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.VersionOrBuilder>(
getVersion(),
getParentForChildren(),
isClean());
version_ = null;
}
return versionBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:kvrwset.KVReadHash)
}
// @@protoc_insertion_point(class_scope:kvrwset.KVReadHash)
private static final org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash();
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public KVReadHash parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new KVReadHash(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVReadHash getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface KVWriteHashOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrwset.KVWriteHash)
com.google.protobuf.MessageOrBuilder {
/**
* optional bytes key_hash = 1;
*/
com.google.protobuf.ByteString getKeyHash();
/**
* optional bool is_delete = 2;
*/
boolean getIsDelete();
/**
* optional bytes value_hash = 3;
*/
com.google.protobuf.ByteString getValueHash();
}
/**
*
* KVWriteHash is similar to the KVWrite. It captures a write (update/delete) operation performed during transaction simulation
*
*
* Protobuf type {@code kvrwset.KVWriteHash}
*/
public static final class KVWriteHash extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.KVWriteHash)
KVWriteHashOrBuilder {
// Use KVWriteHash.newBuilder() to construct.
private KVWriteHash(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private KVWriteHash() {
keyHash_ = com.google.protobuf.ByteString.EMPTY;
isDelete_ = false;
valueHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KVWriteHash(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
keyHash_ = input.readBytes();
break;
}
case 16: {
isDelete_ = input.readBool();
break;
}
case 26: {
valueHash_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVWriteHash_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVWriteHash_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash.Builder.class);
}
public static final int KEY_HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString keyHash_;
/**
* optional bytes key_hash = 1;
*/
public com.google.protobuf.ByteString getKeyHash() {
return keyHash_;
}
public static final int IS_DELETE_FIELD_NUMBER = 2;
private boolean isDelete_;
/**
* optional bool is_delete = 2;
*/
public boolean getIsDelete() {
return isDelete_;
}
public static final int VALUE_HASH_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString valueHash_;
/**
* optional bytes value_hash = 3;
*/
public com.google.protobuf.ByteString getValueHash() {
return valueHash_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!keyHash_.isEmpty()) {
output.writeBytes(1, keyHash_);
}
if (isDelete_ != false) {
output.writeBool(2, isDelete_);
}
if (!valueHash_.isEmpty()) {
output.writeBytes(3, valueHash_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!keyHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, keyHash_);
}
if (isDelete_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, isDelete_);
}
if (!valueHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, valueHash_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash) obj;
boolean result = true;
result = result && getKeyHash()
.equals(other.getKeyHash());
result = result && (getIsDelete()
== other.getIsDelete());
result = result && getValueHash()
.equals(other.getValueHash());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + KEY_HASH_FIELD_NUMBER;
hash = (53 * hash) + getKeyHash().hashCode();
hash = (37 * hash) + IS_DELETE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsDelete());
hash = (37 * hash) + VALUE_HASH_FIELD_NUMBER;
hash = (53 * hash) + getValueHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWriteHash prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* KVWriteHash is similar to the KVWrite. It captures a write (update/delete) operation performed during transaction simulation
*
* KVMetadataEntry captures a 'name'ed entry in the metadata of a key/key-hash.
*
*
* Protobuf type {@code kvrwset.KVMetadataEntry}
*/
public static final class KVMetadataEntry extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.KVMetadataEntry)
KVMetadataEntryOrBuilder {
// Use KVMetadataEntry.newBuilder() to construct.
private KVMetadataEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private KVMetadataEntry() {
name_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KVMetadataEntry(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
value_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVMetadataEntry_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVMetadataEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* optional string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString value_;
/**
* optional bytes value = 2;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!value_.isEmpty()) {
output.writeBytes(2, value_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, value_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getValue()
.equals(other.getValue());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* KVMetadataEntry captures a 'name'ed entry in the metadata of a key/key-hash.
*
*
* Protobuf type {@code kvrwset.KVMetadataEntry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:kvrwset.KVMetadataEntry)
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVMetadataEntry_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVMetadataEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
name_ = "";
value_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_KVMetadataEntry_descriptor;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.getDefaultInstance();
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry build() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry buildPartial() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry result = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry(this);
result.name_ = name_;
result.value_ = value_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry) {
return mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry other) {
if (other == org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
* optional string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes value = 2;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* optional bytes value = 2;
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* optional bytes value = 2;
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:kvrwset.KVMetadataEntry)
}
// @@protoc_insertion_point(class_scope:kvrwset.KVMetadataEntry)
private static final org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry();
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public KVMetadataEntry parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new KVMetadataEntry(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVMetadataEntry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VersionOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrwset.Version)
com.google.protobuf.MessageOrBuilder {
/**
* optional uint64 block_num = 1;
*/
long getBlockNum();
/**
* optional uint64 tx_num = 2;
*/
long getTxNum();
}
/**
*
* Version encapsulates the version of a Key
* A version of a committed key is maintained as the height of the transaction that committed the key.
* The height is represenetd as a tuple <blockNum, txNum> where the txNum is the position of the transaction
* (starting with 0) within block
*
*
* Protobuf type {@code kvrwset.Version}
*/
public static final class Version extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.Version)
VersionOrBuilder {
// Use Version.newBuilder() to construct.
private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Version() {
blockNum_ = 0L;
txNum_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Version(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
blockNum_ = input.readUInt64();
break;
}
case 16: {
txNum_ = input.readUInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_Version_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_Version_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder.class);
}
public static final int BLOCK_NUM_FIELD_NUMBER = 1;
private long blockNum_;
/**
* optional uint64 block_num = 1;
*/
public long getBlockNum() {
return blockNum_;
}
public static final int TX_NUM_FIELD_NUMBER = 2;
private long txNum_;
/**
* optional uint64 tx_num = 2;
*/
public long getTxNum() {
return txNum_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (blockNum_ != 0L) {
output.writeUInt64(1, blockNum_);
}
if (txNum_ != 0L) {
output.writeUInt64(2, txNum_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (blockNum_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, blockNum_);
}
if (txNum_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, txNum_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version) obj;
boolean result = true;
result = result && (getBlockNum()
== other.getBlockNum());
result = result && (getTxNum()
== other.getTxNum());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + BLOCK_NUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockNum());
hash = (37 * hash) + TX_NUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTxNum());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Version encapsulates the version of a Key
* A version of a committed key is maintained as the height of the transaction that committed the key.
* The height is represenetd as a tuple <blockNum, txNum> where the txNum is the position of the transaction
* (starting with 0) within block
*
*
* Protobuf type {@code kvrwset.Version}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:kvrwset.Version)
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.VersionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_Version_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_Version_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
blockNum_ = 0L;
txNum_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_Version_descriptor;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.getDefaultInstance();
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version build() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version buildPartial() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version result = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version(this);
result.blockNum_ = blockNum_;
result.txNum_ = txNum_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version) {
return mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version other) {
if (other == org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version.getDefaultInstance()) return this;
if (other.getBlockNum() != 0L) {
setBlockNum(other.getBlockNum());
}
if (other.getTxNum() != 0L) {
setTxNum(other.getTxNum());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long blockNum_ ;
/**
* optional uint64 block_num = 1;
*/
public long getBlockNum() {
return blockNum_;
}
/**
* optional uint64 block_num = 1;
*/
public Builder setBlockNum(long value) {
blockNum_ = value;
onChanged();
return this;
}
/**
* optional uint64 block_num = 1;
*/
public Builder clearBlockNum() {
blockNum_ = 0L;
onChanged();
return this;
}
private long txNum_ ;
/**
* optional uint64 tx_num = 2;
*/
public long getTxNum() {
return txNum_;
}
/**
* optional uint64 tx_num = 2;
*/
public Builder setTxNum(long value) {
txNum_ = value;
onChanged();
return this;
}
/**
* optional uint64 tx_num = 2;
*/
public Builder clearTxNum() {
txNum_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:kvrwset.Version)
}
// @@protoc_insertion_point(class_scope:kvrwset.Version)
private static final org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version();
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Version parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Version(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.Version getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RangeQueryInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrwset.RangeQueryInfo)
com.google.protobuf.MessageOrBuilder {
/**
* optional string start_key = 1;
*/
java.lang.String getStartKey();
/**
* optional string start_key = 1;
*/
com.google.protobuf.ByteString
getStartKeyBytes();
/**
* optional string end_key = 2;
*/
java.lang.String getEndKey();
/**
* optional string end_key = 2;
*/
com.google.protobuf.ByteString
getEndKeyBytes();
/**
* optional bool itr_exhausted = 3;
*/
boolean getItrExhausted();
/**
* optional .kvrwset.QueryReads raw_reads = 4;
*/
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads getRawReads();
/**
* optional .kvrwset.QueryReads raw_reads = 4;
*/
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsOrBuilder getRawReadsOrBuilder();
/**
* optional .kvrwset.QueryReadsMerkleSummary reads_merkle_hashes = 5;
*/
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary getReadsMerkleHashes();
/**
* optional .kvrwset.QueryReadsMerkleSummary reads_merkle_hashes = 5;
*/
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummaryOrBuilder getReadsMerkleHashesOrBuilder();
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo.ReadsInfoCase getReadsInfoCase();
}
/**
*
* RangeQueryInfo encapsulates the details of a range query performed by a transaction during simulation.
* This helps protect transactions from phantom reads by varifying during validation whether any new items
* got committed within the given range between transaction simuation and validation
* (in addition to regular checks for updates/deletes of the existing items).
* readInfo field contains either the KVReads (for the items read by the range query) or a merkle-tree hash
* if the KVReads exceeds a pre-configured numbers
*
*
* Protobuf type {@code kvrwset.RangeQueryInfo}
*/
public static final class RangeQueryInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.RangeQueryInfo)
RangeQueryInfoOrBuilder {
// Use RangeQueryInfo.newBuilder() to construct.
private RangeQueryInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private RangeQueryInfo() {
startKey_ = "";
endKey_ = "";
itrExhausted_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private RangeQueryInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
startKey_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
endKey_ = s;
break;
}
case 24: {
itrExhausted_ = input.readBool();
break;
}
case 34: {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads.Builder subBuilder = null;
if (readsInfoCase_ == 4) {
subBuilder = ((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads) readsInfo_).toBuilder();
}
readsInfo_ =
input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads) readsInfo_);
readsInfo_ = subBuilder.buildPartial();
}
readsInfoCase_ = 4;
break;
}
case 42: {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.Builder subBuilder = null;
if (readsInfoCase_ == 5) {
subBuilder = ((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) readsInfo_).toBuilder();
}
readsInfo_ =
input.readMessage(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) readsInfo_);
readsInfo_ = subBuilder.buildPartial();
}
readsInfoCase_ = 5;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_RangeQueryInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_RangeQueryInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo.Builder.class);
}
private int readsInfoCase_ = 0;
private java.lang.Object readsInfo_;
public enum ReadsInfoCase
implements com.google.protobuf.Internal.EnumLite {
RAW_READS(4),
READS_MERKLE_HASHES(5),
READSINFO_NOT_SET(0);
private final int value;
private ReadsInfoCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ReadsInfoCase valueOf(int value) {
return forNumber(value);
}
public static ReadsInfoCase forNumber(int value) {
switch (value) {
case 4: return RAW_READS;
case 5: return READS_MERKLE_HASHES;
case 0: return READSINFO_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ReadsInfoCase
getReadsInfoCase() {
return ReadsInfoCase.forNumber(
readsInfoCase_);
}
public static final int START_KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object startKey_;
/**
* optional string start_key = 1;
*/
public java.lang.String getStartKey() {
java.lang.Object ref = startKey_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
startKey_ = s;
return s;
}
}
/**
* optional string start_key = 1;
*/
public com.google.protobuf.ByteString
getStartKeyBytes() {
java.lang.Object ref = startKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int END_KEY_FIELD_NUMBER = 2;
private volatile java.lang.Object endKey_;
/**
* optional string end_key = 2;
*/
public java.lang.String getEndKey() {
java.lang.Object ref = endKey_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endKey_ = s;
return s;
}
}
/**
* optional string end_key = 2;
*/
public com.google.protobuf.ByteString
getEndKeyBytes() {
java.lang.Object ref = endKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ITR_EXHAUSTED_FIELD_NUMBER = 3;
private boolean itrExhausted_;
/**
* optional bool itr_exhausted = 3;
*/
public boolean getItrExhausted() {
return itrExhausted_;
}
public static final int RAW_READS_FIELD_NUMBER = 4;
/**
* optional .kvrwset.QueryReads raw_reads = 4;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads getRawReads() {
if (readsInfoCase_ == 4) {
return (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads) readsInfo_;
}
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads.getDefaultInstance();
}
/**
* optional .kvrwset.QueryReads raw_reads = 4;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsOrBuilder getRawReadsOrBuilder() {
if (readsInfoCase_ == 4) {
return (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads) readsInfo_;
}
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads.getDefaultInstance();
}
public static final int READS_MERKLE_HASHES_FIELD_NUMBER = 5;
/**
* optional .kvrwset.QueryReadsMerkleSummary reads_merkle_hashes = 5;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary getReadsMerkleHashes() {
if (readsInfoCase_ == 5) {
return (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) readsInfo_;
}
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.getDefaultInstance();
}
/**
* optional .kvrwset.QueryReadsMerkleSummary reads_merkle_hashes = 5;
*/
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummaryOrBuilder getReadsMerkleHashesOrBuilder() {
if (readsInfoCase_ == 5) {
return (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) readsInfo_;
}
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getStartKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startKey_);
}
if (!getEndKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endKey_);
}
if (itrExhausted_ != false) {
output.writeBool(3, itrExhausted_);
}
if (readsInfoCase_ == 4) {
output.writeMessage(4, (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads) readsInfo_);
}
if (readsInfoCase_ == 5) {
output.writeMessage(5, (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) readsInfo_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getStartKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startKey_);
}
if (!getEndKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endKey_);
}
if (itrExhausted_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, itrExhausted_);
}
if (readsInfoCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReads) readsInfo_);
}
if (readsInfoCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) readsInfo_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo) obj;
boolean result = true;
result = result && getStartKey()
.equals(other.getStartKey());
result = result && getEndKey()
.equals(other.getEndKey());
result = result && (getItrExhausted()
== other.getItrExhausted());
result = result && getReadsInfoCase().equals(
other.getReadsInfoCase());
if (!result) return false;
switch (readsInfoCase_) {
case 4:
result = result && getRawReads()
.equals(other.getRawReads());
break;
case 5:
result = result && getReadsMerkleHashes()
.equals(other.getReadsMerkleHashes());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + START_KEY_FIELD_NUMBER;
hash = (53 * hash) + getStartKey().hashCode();
hash = (37 * hash) + END_KEY_FIELD_NUMBER;
hash = (53 * hash) + getEndKey().hashCode();
hash = (37 * hash) + ITR_EXHAUSTED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getItrExhausted());
switch (readsInfoCase_) {
case 4:
hash = (37 * hash) + RAW_READS_FIELD_NUMBER;
hash = (53 * hash) + getRawReads().hashCode();
break;
case 5:
hash = (37 * hash) + READS_MERKLE_HASHES_FIELD_NUMBER;
hash = (53 * hash) + getReadsMerkleHashes().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.RangeQueryInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* RangeQueryInfo encapsulates the details of a range query performed by a transaction during simulation.
* This helps protect transactions from phantom reads by varifying during validation whether any new items
* got committed within the given range between transaction simuation and validation
* (in addition to regular checks for updates/deletes of the existing items).
* readInfo field contains either the KVReads (for the items read by the range query) or a merkle-tree hash
* if the KVReads exceeds a pre-configured numbers
*
* QueryReadsMerkleSummary encapsulates the Merkle-tree hashes for the QueryReads
* This allows to reduce the size of RWSet in the presence of query results
* by storing certain hashes instead of actual results.
* maxDegree field refers to the maximum number of children in the tree at any level
* maxLevel field contains the lowest level which has lesser nodes than maxDegree (starting from leaf level)
*
*
* Protobuf type {@code kvrwset.QueryReadsMerkleSummary}
*/
public static final class QueryReadsMerkleSummary extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrwset.QueryReadsMerkleSummary)
QueryReadsMerkleSummaryOrBuilder {
// Use QueryReadsMerkleSummary.newBuilder() to construct.
private QueryReadsMerkleSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private QueryReadsMerkleSummary() {
maxDegree_ = 0;
maxLevel_ = 0;
maxLevelHashes_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private QueryReadsMerkleSummary(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
maxDegree_ = input.readUInt32();
break;
}
case 16: {
maxLevel_ = input.readUInt32();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
maxLevelHashes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
maxLevelHashes_.add(input.readBytes());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
maxLevelHashes_ = java.util.Collections.unmodifiableList(maxLevelHashes_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_QueryReadsMerkleSummary_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_QueryReadsMerkleSummary_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.Builder.class);
}
private int bitField0_;
public static final int MAX_DEGREE_FIELD_NUMBER = 1;
private int maxDegree_;
/**
* optional uint32 max_degree = 1;
*/
public int getMaxDegree() {
return maxDegree_;
}
public static final int MAX_LEVEL_FIELD_NUMBER = 2;
private int maxLevel_;
/**
* optional uint32 max_level = 2;
*/
public int getMaxLevel() {
return maxLevel_;
}
public static final int MAX_LEVEL_HASHES_FIELD_NUMBER = 3;
private java.util.List maxLevelHashes_;
/**
* repeated bytes max_level_hashes = 3;
*/
public java.util.List
getMaxLevelHashesList() {
return maxLevelHashes_;
}
/**
* repeated bytes max_level_hashes = 3;
*/
public int getMaxLevelHashesCount() {
return maxLevelHashes_.size();
}
/**
* repeated bytes max_level_hashes = 3;
*/
public com.google.protobuf.ByteString getMaxLevelHashes(int index) {
return maxLevelHashes_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (maxDegree_ != 0) {
output.writeUInt32(1, maxDegree_);
}
if (maxLevel_ != 0) {
output.writeUInt32(2, maxLevel_);
}
for (int i = 0; i < maxLevelHashes_.size(); i++) {
output.writeBytes(3, maxLevelHashes_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (maxDegree_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, maxDegree_);
}
if (maxLevel_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, maxLevel_);
}
{
int dataSize = 0;
for (int i = 0; i < maxLevelHashes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(maxLevelHashes_.get(i));
}
size += dataSize;
size += 1 * getMaxLevelHashesList().size();
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary other = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) obj;
boolean result = true;
result = result && (getMaxDegree()
== other.getMaxDegree());
result = result && (getMaxLevel()
== other.getMaxLevel());
result = result && getMaxLevelHashesList()
.equals(other.getMaxLevelHashesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + MAX_DEGREE_FIELD_NUMBER;
hash = (53 * hash) + getMaxDegree();
hash = (37 * hash) + MAX_LEVEL_FIELD_NUMBER;
hash = (53 * hash) + getMaxLevel();
if (getMaxLevelHashesCount() > 0) {
hash = (37 * hash) + MAX_LEVEL_HASHES_FIELD_NUMBER;
hash = (53 * hash) + getMaxLevelHashesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* QueryReadsMerkleSummary encapsulates the Merkle-tree hashes for the QueryReads
* This allows to reduce the size of RWSet in the presence of query results
* by storing certain hashes instead of actual results.
* maxDegree field refers to the maximum number of children in the tree at any level
* maxLevel field contains the lowest level which has lesser nodes than maxDegree (starting from leaf level)
*
*
* Protobuf type {@code kvrwset.QueryReadsMerkleSummary}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:kvrwset.QueryReadsMerkleSummary)
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummaryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_QueryReadsMerkleSummary_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_QueryReadsMerkleSummary_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.class, org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
maxDegree_ = 0;
maxLevel_ = 0;
maxLevelHashes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.internal_static_kvrwset_QueryReadsMerkleSummary_descriptor;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.getDefaultInstance();
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary build() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary buildPartial() {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary result = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.maxDegree_ = maxDegree_;
result.maxLevel_ = maxLevel_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
maxLevelHashes_ = java.util.Collections.unmodifiableList(maxLevelHashes_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.maxLevelHashes_ = maxLevelHashes_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) {
return mergeFrom((org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary other) {
if (other == org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary.getDefaultInstance()) return this;
if (other.getMaxDegree() != 0) {
setMaxDegree(other.getMaxDegree());
}
if (other.getMaxLevel() != 0) {
setMaxLevel(other.getMaxLevel());
}
if (!other.maxLevelHashes_.isEmpty()) {
if (maxLevelHashes_.isEmpty()) {
maxLevelHashes_ = other.maxLevelHashes_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureMaxLevelHashesIsMutable();
maxLevelHashes_.addAll(other.maxLevelHashes_);
}
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int maxDegree_ ;
/**
* optional uint32 max_degree = 1;
*/
public int getMaxDegree() {
return maxDegree_;
}
/**
* optional uint32 max_degree = 1;
*/
public Builder setMaxDegree(int value) {
maxDegree_ = value;
onChanged();
return this;
}
/**
* optional uint32 max_degree = 1;
*/
public Builder clearMaxDegree() {
maxDegree_ = 0;
onChanged();
return this;
}
private int maxLevel_ ;
/**
* optional uint32 max_level = 2;
*/
public int getMaxLevel() {
return maxLevel_;
}
/**
* optional uint32 max_level = 2;
*/
public Builder setMaxLevel(int value) {
maxLevel_ = value;
onChanged();
return this;
}
/**
* optional uint32 max_level = 2;
*/
public Builder clearMaxLevel() {
maxLevel_ = 0;
onChanged();
return this;
}
private java.util.List maxLevelHashes_ = java.util.Collections.emptyList();
private void ensureMaxLevelHashesIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
maxLevelHashes_ = new java.util.ArrayList(maxLevelHashes_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated bytes max_level_hashes = 3;
*/
public java.util.List
getMaxLevelHashesList() {
return java.util.Collections.unmodifiableList(maxLevelHashes_);
}
/**
* repeated bytes max_level_hashes = 3;
*/
public int getMaxLevelHashesCount() {
return maxLevelHashes_.size();
}
/**
* repeated bytes max_level_hashes = 3;
*/
public com.google.protobuf.ByteString getMaxLevelHashes(int index) {
return maxLevelHashes_.get(index);
}
/**
* repeated bytes max_level_hashes = 3;
*/
public Builder setMaxLevelHashes(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureMaxLevelHashesIsMutable();
maxLevelHashes_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes max_level_hashes = 3;
*/
public Builder addMaxLevelHashes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureMaxLevelHashesIsMutable();
maxLevelHashes_.add(value);
onChanged();
return this;
}
/**
* repeated bytes max_level_hashes = 3;
*/
public Builder addAllMaxLevelHashes(
java.lang.Iterable values) {
ensureMaxLevelHashesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, maxLevelHashes_);
onChanged();
return this;
}
/**
* repeated bytes max_level_hashes = 3;
*/
public Builder clearMaxLevelHashes() {
maxLevelHashes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:kvrwset.QueryReadsMerkleSummary)
}
// @@protoc_insertion_point(class_scope:kvrwset.QueryReadsMerkleSummary)
private static final org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary();
}
public static org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public QueryReadsMerkleSummary parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QueryReadsMerkleSummary(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.QueryReadsMerkleSummary getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVRWSet_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVRWSet_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_HashedRWSet_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_HashedRWSet_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVRead_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVRead_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVWrite_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVWrite_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVMetadataWrite_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVMetadataWrite_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVReadHash_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVReadHash_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVWriteHash_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVWriteHash_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVMetadataWriteHash_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVMetadataWriteHash_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_KVMetadataEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_KVMetadataEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_Version_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_Version_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_RangeQueryInfo_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_RangeQueryInfo_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_QueryReads_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_QueryReads_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_kvrwset_QueryReadsMerkleSummary_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_kvrwset_QueryReadsMerkleSummary_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n#ledger/rwset/kvrwset/kv_rwset.proto\022\007k" +
"vrwset\"\263\001\n\007KVRWSet\022\036\n\005reads\030\001 \003(\0132\017.kvrw" +
"set.KVRead\0223\n\022range_queries_info\030\002 \003(\0132\027" +
".kvrwset.RangeQueryInfo\022 \n\006writes\030\003 \003(\0132" +
"\020.kvrwset.KVWrite\0221\n\017metadata_writes\030\004 \003" +
"(\0132\030.kvrwset.KVMetadataWrite\"\234\001\n\013HashedR" +
"WSet\022)\n\014hashed_reads\030\001 \003(\0132\023.kvrwset.KVR" +
"eadHash\022+\n\rhashed_writes\030\002 \003(\0132\024.kvrwset" +
".KVWriteHash\0225\n\017metadata_writes\030\003 \003(\0132\034." +
"kvrwset.KVMetadataWriteHash\"8\n\006KVRead\022\013\n",
"\003key\030\001 \001(\t\022!\n\007version\030\002 \001(\0132\020.kvrwset.Ve" +
"rsion\"8\n\007KVWrite\022\013\n\003key\030\001 \001(\t\022\021\n\tis_dele" +
"te\030\002 \001(\010\022\r\n\005value\030\003 \001(\014\"I\n\017KVMetadataWri" +
"te\022\013\n\003key\030\001 \001(\t\022)\n\007entries\030\002 \003(\0132\030.kvrws" +
"et.KVMetadataEntry\"A\n\nKVReadHash\022\020\n\010key_" +
"hash\030\001 \001(\014\022!\n\007version\030\002 \001(\0132\020.kvrwset.Ve" +
"rsion\"F\n\013KVWriteHash\022\020\n\010key_hash\030\001 \001(\014\022\021" +
"\n\tis_delete\030\002 \001(\010\022\022\n\nvalue_hash\030\003 \001(\014\"R\n" +
"\023KVMetadataWriteHash\022\020\n\010key_hash\030\001 \001(\014\022)" +
"\n\007entries\030\002 \003(\0132\030.kvrwset.KVMetadataEntr",
"y\".\n\017KVMetadataEntry\022\014\n\004name\030\001 \001(\t\022\r\n\005va" +
"lue\030\002 \001(\014\",\n\007Version\022\021\n\tblock_num\030\001 \001(\004\022" +
"\016\n\006tx_num\030\002 \001(\004\"\304\001\n\016RangeQueryInfo\022\021\n\tst" +
"art_key\030\001 \001(\t\022\017\n\007end_key\030\002 \001(\t\022\025\n\ritr_ex" +
"hausted\030\003 \001(\010\022(\n\traw_reads\030\004 \001(\0132\023.kvrws" +
"et.QueryReadsH\000\022?\n\023reads_merkle_hashes\030\005" +
" \001(\0132 .kvrwset.QueryReadsMerkleSummaryH\000" +
"B\014\n\nreads_info\"/\n\nQueryReads\022!\n\010kv_reads" +
"\030\001 \003(\0132\017.kvrwset.KVRead\"Z\n\027QueryReadsMer" +
"kleSummary\022\022\n\nmax_degree\030\001 \001(\r\022\021\n\tmax_le",
"vel\030\002 \001(\r\022\030\n\020max_level_hashes\030\003 \003(\014Bo\n2o" +
"rg.hyperledger.fabric.protos.ledger.rwse" +
"t.kvrwsetZ9github.com/hyperledger/fabric" +
"/protos/ledger/rwset/kvrwsetb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_kvrwset_KVRWSet_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_kvrwset_KVRWSet_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVRWSet_descriptor,
new java.lang.String[] { "Reads", "RangeQueriesInfo", "Writes", "MetadataWrites", });
internal_static_kvrwset_HashedRWSet_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_kvrwset_HashedRWSet_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_HashedRWSet_descriptor,
new java.lang.String[] { "HashedReads", "HashedWrites", "MetadataWrites", });
internal_static_kvrwset_KVRead_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_kvrwset_KVRead_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVRead_descriptor,
new java.lang.String[] { "Key", "Version", });
internal_static_kvrwset_KVWrite_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_kvrwset_KVWrite_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVWrite_descriptor,
new java.lang.String[] { "Key", "IsDelete", "Value", });
internal_static_kvrwset_KVMetadataWrite_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_kvrwset_KVMetadataWrite_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVMetadataWrite_descriptor,
new java.lang.String[] { "Key", "Entries", });
internal_static_kvrwset_KVReadHash_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_kvrwset_KVReadHash_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVReadHash_descriptor,
new java.lang.String[] { "KeyHash", "Version", });
internal_static_kvrwset_KVWriteHash_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_kvrwset_KVWriteHash_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVWriteHash_descriptor,
new java.lang.String[] { "KeyHash", "IsDelete", "ValueHash", });
internal_static_kvrwset_KVMetadataWriteHash_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_kvrwset_KVMetadataWriteHash_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVMetadataWriteHash_descriptor,
new java.lang.String[] { "KeyHash", "Entries", });
internal_static_kvrwset_KVMetadataEntry_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_kvrwset_KVMetadataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_KVMetadataEntry_descriptor,
new java.lang.String[] { "Name", "Value", });
internal_static_kvrwset_Version_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_kvrwset_Version_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_Version_descriptor,
new java.lang.String[] { "BlockNum", "TxNum", });
internal_static_kvrwset_RangeQueryInfo_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_kvrwset_RangeQueryInfo_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_RangeQueryInfo_descriptor,
new java.lang.String[] { "StartKey", "EndKey", "ItrExhausted", "RawReads", "ReadsMerkleHashes", "ReadsInfo", });
internal_static_kvrwset_QueryReads_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_kvrwset_QueryReads_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_QueryReads_descriptor,
new java.lang.String[] { "KvReads", });
internal_static_kvrwset_QueryReadsMerkleSummary_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_kvrwset_QueryReadsMerkleSummary_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_kvrwset_QueryReadsMerkleSummary_descriptor,
new java.lang.String[] { "MaxDegree", "MaxLevel", "MaxLevelHashes", });
}
// @@protoc_insertion_point(outer_class_scope)
}