public static final class EndorsementDescriptor.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder> 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 | Method and Description |
---|---|
EndorsementDescriptor.Builder |
addAllLayouts(Iterable<? extends Layout> values)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
addLayouts(int index,
Layout.Builder builderForValue)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
addLayouts(int index,
Layout value)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
addLayouts(Layout.Builder builderForValue)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
addLayouts(Layout value)
Specifies options of fulfulling the endorsement policy.
|
Layout.Builder |
addLayoutsBuilder()
Specifies options of fulfulling the endorsement policy.
|
Layout.Builder |
addLayoutsBuilder(int index)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
EndorsementDescriptor |
build() |
EndorsementDescriptor |
buildPartial() |
EndorsementDescriptor.Builder |
clear() |
EndorsementDescriptor.Builder |
clearChaincode()
string chaincode = 1 [json_name = "chaincode"]; |
EndorsementDescriptor.Builder |
clearEndorsersByGroups() |
EndorsementDescriptor.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
EndorsementDescriptor.Builder |
clearLayouts()
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
EndorsementDescriptor.Builder |
clone() |
boolean |
containsEndorsersByGroups(String key)
Specifies the endorsers, separated to groups.
|
String |
getChaincode()
string chaincode = 1 [json_name = "chaincode"]; |
com.google.protobuf.ByteString |
getChaincodeBytes()
string chaincode = 1 [json_name = "chaincode"]; |
EndorsementDescriptor |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
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.
|
Layout.Builder |
getLayoutsBuilder(int index)
Specifies options of fulfulling the endorsement policy.
|
List<Layout.Builder> |
getLayoutsBuilderList()
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.
|
Map<String,Peers> |
getMutableEndorsersByGroups()
Deprecated.
|
boolean |
isInitialized() |
EndorsementDescriptor.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
EndorsementDescriptor.Builder |
mergeFrom(EndorsementDescriptor other) |
EndorsementDescriptor.Builder |
mergeFrom(com.google.protobuf.Message other) |
EndorsementDescriptor.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
EndorsementDescriptor.Builder |
putAllEndorsersByGroups(Map<String,Peers> values)
Specifies the endorsers, separated to groups.
|
EndorsementDescriptor.Builder |
putEndorsersByGroups(String key,
Peers value)
Specifies the endorsers, separated to groups.
|
EndorsementDescriptor.Builder |
removeEndorsersByGroups(String key)
Specifies the endorsers, separated to groups.
|
EndorsementDescriptor.Builder |
removeLayouts(int index)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
setChaincode(String value)
string chaincode = 1 [json_name = "chaincode"]; |
EndorsementDescriptor.Builder |
setChaincodeBytes(com.google.protobuf.ByteString value)
string chaincode = 1 [json_name = "chaincode"]; |
EndorsementDescriptor.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
EndorsementDescriptor.Builder |
setLayouts(int index,
Layout.Builder builderForValue)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
setLayouts(int index,
Layout value)
Specifies options of fulfulling the endorsement policy.
|
EndorsementDescriptor.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
EndorsementDescriptor.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, newBuilderForField
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
public EndorsementDescriptor.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public EndorsementDescriptor build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public EndorsementDescriptor buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public EndorsementDescriptor.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder mergeFrom(EndorsementDescriptor other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public EndorsementDescriptor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<EndorsementDescriptor.Builder>
IOException
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 EndorsementDescriptor.Builder setChaincode(String value)
string chaincode = 1 [json_name = "chaincode"];
value
- The chaincode to set.public EndorsementDescriptor.Builder clearChaincode()
string chaincode = 1 [json_name = "chaincode"];
public EndorsementDescriptor.Builder setChaincodeBytes(com.google.protobuf.ByteString value)
string chaincode = 1 [json_name = "chaincode"];
value
- The bytes for chaincode to set.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 EndorsementDescriptor.Builder clearEndorsersByGroups()
public EndorsementDescriptor.Builder removeEndorsersByGroups(String key)
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
@Deprecated public Map<String,Peers> getMutableEndorsersByGroups()
public EndorsementDescriptor.Builder putEndorsersByGroups(String key, Peers value)
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
public EndorsementDescriptor.Builder putAllEndorsersByGroups(Map<String,Peers> values)
Specifies the endorsers, separated to groups.
map<string, .discovery.Peers> endorsers_by_groups = 2 [json_name = "endorsersByGroups"];
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 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 EndorsementDescriptor.Builder setLayouts(int index, Layout value)
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"];
public EndorsementDescriptor.Builder setLayouts(int index, Layout.Builder builderForValue)
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"];
public EndorsementDescriptor.Builder addLayouts(Layout value)
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"];
public EndorsementDescriptor.Builder addLayouts(int index, Layout value)
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"];
public EndorsementDescriptor.Builder addLayouts(Layout.Builder builderForValue)
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"];
public EndorsementDescriptor.Builder addLayouts(int index, Layout.Builder builderForValue)
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"];
public EndorsementDescriptor.Builder addAllLayouts(Iterable<? extends Layout> values)
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"];
public EndorsementDescriptor.Builder clearLayouts()
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"];
public EndorsementDescriptor.Builder removeLayouts(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"];
public Layout.Builder getLayoutsBuilder(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"];
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 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 Layout.Builder addLayoutsBuilder()
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"];
public Layout.Builder addLayoutsBuilder(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"];
public List<Layout.Builder> getLayoutsBuilderList()
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"];
public final EndorsementDescriptor.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
public final EndorsementDescriptor.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<EndorsementDescriptor.Builder>
Copyright © 2022. All rights reserved.