public final class EndorsementDescriptor extends com.google.protobuf.GeneratedMessageV3 implements EndorsementDescriptorOrBuilder
EndorsementDescriptor contains information about which peers can be used to request endorsement from, such that the endorsement policy would be fulfilled. Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor: Let e: G --> P be the endorsers_by_groups field that maps a group to a set of peers. Note that applying e on a group g yields a set of peers. 1) Select a layout l: G --> N out of the layouts given. l is the quantities_by_group field of a Layout, and it maps a group to an integer. 2) R = {} (an empty set of peers) 3) For each group g in the layout l, compute n = l(g) 3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g) 3.2) R = R U P_g (add P_g to R) 4) The set of peers R is the peers the client needs to request endorsements fromProtobuf type
discovery.EndorsementDescriptor
Modifier and Type | Class and Description |
---|---|
static class |
EndorsementDescriptor.Builder
EndorsementDescriptor contains information about which peers can be used
to request endorsement from, such that the endorsement policy would be fulfilled.
|
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
CHAINCODE_FIELD_NUMBER |
static int |
ENDORSERS_BY_GROUPS_FIELD_NUMBER |
static int |
LAYOUTS_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
containsEndorsersByGroups(String key)
Specifies the endorsers, separated to groups.
|
boolean |
equals(Object obj) |
String |
getChaincode()
string chaincode = 1 [json_name = "chaincode"]; |
com.google.protobuf.ByteString |
getChaincodeBytes()
string chaincode = 1 [json_name = "chaincode"]; |
static EndorsementDescriptor |
getDefaultInstance() |
EndorsementDescriptor |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Map<String,Peers> |
getEndorsersByGroups()
Deprecated.
|
int |
getEndorsersByGroupsCount()
Specifies the endorsers, separated to groups.
|
Map<String,Peers> |
getEndorsersByGroupsMap()
Specifies the endorsers, separated to groups.
|
Peers |
getEndorsersByGroupsOrDefault(String key,
Peers defaultValue)
Specifies the endorsers, separated to groups.
|
Peers |
getEndorsersByGroupsOrThrow(String key)
Specifies the endorsers, separated to groups.
|
Layout |
getLayouts(int index)
Specifies options of fulfulling the endorsement policy.
|
int |
getLayoutsCount()
Specifies options of fulfulling the endorsement policy.
|
List<Layout> |
getLayoutsList()
Specifies options of fulfulling the endorsement policy.
|
LayoutOrBuilder |
getLayoutsOrBuilder(int index)
Specifies options of fulfulling the endorsement policy.
|
List<? extends LayoutOrBuilder> |
getLayoutsOrBuilderList()
Specifies options of fulfulling the endorsement policy.
|
com.google.protobuf.Parser<EndorsementDescriptor> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
isInitialized() |
static EndorsementDescriptor.Builder |
newBuilder() |
static EndorsementDescriptor.Builder |
newBuilder(EndorsementDescriptor prototype) |
EndorsementDescriptor.Builder |
newBuilderForType() |
static EndorsementDescriptor |
parseDelimitedFrom(InputStream input) |
static EndorsementDescriptor |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static EndorsementDescriptor |
parseFrom(byte[] data) |
static EndorsementDescriptor |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static EndorsementDescriptor |
parseFrom(ByteBuffer data) |
static EndorsementDescriptor |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static EndorsementDescriptor |
parseFrom(com.google.protobuf.ByteString data) |
static EndorsementDescriptor |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static EndorsementDescriptor |
parseFrom(com.google.protobuf.CodedInputStream input) |
static EndorsementDescriptor |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static EndorsementDescriptor |
parseFrom(InputStream input) |
static EndorsementDescriptor |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<EndorsementDescriptor> |
parser() |
EndorsementDescriptor.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
findInitializationErrors, getInitializationErrorString, toString
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int CHAINCODE_FIELD_NUMBER
public static final int ENDORSERS_BY_GROUPS_FIELD_NUMBER
public static final int LAYOUTS_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessageV3
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
public String getChaincode()
string chaincode = 1 [json_name = "chaincode"];
getChaincode
in interface EndorsementDescriptorOrBuilder
public com.google.protobuf.ByteString getChaincodeBytes()
string chaincode = 1 [json_name = "chaincode"];
getChaincodeBytes
in interface EndorsementDescriptorOrBuilder
public int getEndorsersByGroupsCount()
EndorsementDescriptorOrBuilder
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
getEndorsersByGroupsCount
in interface EndorsementDescriptorOrBuilder
public boolean containsEndorsersByGroups(String key)
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
containsEndorsersByGroups
in interface EndorsementDescriptorOrBuilder
@Deprecated public Map<String,Peers> getEndorsersByGroups()
getEndorsersByGroupsMap()
instead.getEndorsersByGroups
in interface EndorsementDescriptorOrBuilder
public Map<String,Peers> getEndorsersByGroupsMap()
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
getEndorsersByGroupsMap
in interface EndorsementDescriptorOrBuilder
public Peers getEndorsersByGroupsOrDefault(String key, Peers defaultValue)
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
getEndorsersByGroupsOrDefault
in interface EndorsementDescriptorOrBuilder
public Peers getEndorsersByGroupsOrThrow(String key)
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
getEndorsersByGroupsOrThrow
in interface EndorsementDescriptorOrBuilder
public List<Layout> getLayoutsList()
Specifies options of fulfulling the endorsement policy. Each option lists the group names, and the amount of signatures needed from each group.
repeated .discovery.Layout layouts = 3 [json_name = "layouts"];
getLayoutsList
in interface EndorsementDescriptorOrBuilder
public List<? extends LayoutOrBuilder> getLayoutsOrBuilderList()
Specifies options of fulfulling the endorsement policy. Each option lists the group names, and the amount of signatures needed from each group.
repeated .discovery.Layout layouts = 3 [json_name = "layouts"];
getLayoutsOrBuilderList
in interface EndorsementDescriptorOrBuilder
public int getLayoutsCount()
Specifies options of fulfulling the endorsement policy. Each option lists the group names, and the amount of signatures needed from each group.
repeated .discovery.Layout layouts = 3 [json_name = "layouts"];
getLayoutsCount
in interface EndorsementDescriptorOrBuilder
public Layout getLayouts(int index)
Specifies options of fulfulling the endorsement policy. Each option lists the group names, and the amount of signatures needed from each group.
repeated .discovery.Layout layouts = 3 [json_name = "layouts"];
getLayouts
in interface EndorsementDescriptorOrBuilder
public LayoutOrBuilder getLayoutsOrBuilder(int index)
Specifies options of fulfulling the endorsement policy. Each option lists the group names, and the amount of signatures needed from each group.
repeated .discovery.Layout layouts = 3 [json_name = "layouts"];
getLayoutsOrBuilder
in interface EndorsementDescriptorOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static EndorsementDescriptor parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static EndorsementDescriptor parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static EndorsementDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static EndorsementDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static EndorsementDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static EndorsementDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static EndorsementDescriptor parseFrom(InputStream input) throws IOException
IOException
public static EndorsementDescriptor parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static EndorsementDescriptor parseDelimitedFrom(InputStream input) throws IOException
IOException
public static EndorsementDescriptor parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static EndorsementDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static EndorsementDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public EndorsementDescriptor.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static EndorsementDescriptor.Builder newBuilder()
public static EndorsementDescriptor.Builder newBuilder(EndorsementDescriptor prototype)
public EndorsementDescriptor.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
public static EndorsementDescriptor getDefaultInstance()
public static com.google.protobuf.Parser<EndorsementDescriptor> parser()
public com.google.protobuf.Parser<EndorsementDescriptor> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessageV3
public EndorsementDescriptor getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2022. All rights reserved.