Package org.fisco.bcos.sdk.service
Interface GroupManagerService
- All Known Implementing Classes:
GroupManagerServiceImpl
public interface GroupManagerService
-
Field Summary
Fields Modifier and Type Field Description static java.math.BigInteger
BLOCK_LIMIT
-
Method Summary
Modifier and Type Method Description void
asyncSendMessageToGroup(java.lang.Integer groupId, Message message, ResponseCallback callback)
Send a message to a node in the group and select the node with the highest block height in the groupvoid
asyncSendMessageToGroupByRule(java.lang.Integer groupId, Message message, PeerSelectRule rule, ResponseCallback callback)
Send messages to nodes in the group according to specified rules (If multiple nodes are filtered out, only select one of them to send the message)void
asyncSendTransaction(java.lang.Integer groupId, Message transactionData, TransactionCallback callback, ResponseCallback responseCallback)
void
broadcastMessageToGroup(java.lang.Integer groupId, Message message)
Broadcast messages to all the nodes of the specified groupvoid
eraseBlockNotifyCallback(java.lang.String registerId)
void
eraseTransactionSeq(java.lang.String seq)
void
fetchGroupList()
java.math.BigInteger
getBlockLimitByGroup(java.lang.Integer groupId)
Get block limit of specified groupChannel
getChannel()
ConfigOption
getConfig()
java.lang.Integer
getCryptoType(java.lang.String peerInfo)
java.util.List<java.lang.String>
getGroupAvailablePeers(java.lang.Integer groupId)
get available ip and port info of specified groupjava.util.List<ConnectionInfo>
getGroupConnectionInfo(java.lang.Integer groupId)
java.util.List<java.lang.String>
getGroupInfoByNodeInfo(java.lang.String nodeAddress)
Get the group list of specified nodejava.util.Set<java.lang.Integer>
getGroupList()
java.util.Set<java.lang.String>
getGroupNodeList(java.lang.Integer groupId)
Get the node list of the specified groupjava.math.BigInteger
getLatestBlockNumberByGroup(java.lang.Integer groupId)
NodeVersion
getNodeVersion(java.lang.String peerInfo)
java.lang.String
registerBlockNotifyCallback(BlockNumberNotifyCallback callback)
Response
sendMessageToGroup(java.lang.Integer groupId, Message message)
Send a message to a node in the group and select the node with the highest block height in the groupResponse
sendMessageToGroupByRule(java.lang.Integer groupId, Message message, PeerSelectRule rule)
Send messages to nodes in the group according to specified rules (If multiple nodes are filtered out, only select one of them to send the message)void
setAmop(Amop amop)
void
stop()
void
updateBlockNumberInfo(java.lang.Integer groupId, java.lang.String peerInfo, java.math.BigInteger currentBlockNumber)
update the block number information for the specified groupvoid
updateGroupInfo(java.lang.String peerIpAndPort, java.util.List<java.lang.String> groupList)
Update the group list information of the nodevoid
updateNodeVersion()
-
Field Details
-
BLOCK_LIMIT
static final java.math.BigInteger BLOCK_LIMIT
-
-
Method Details
-
updateGroupInfo
void updateGroupInfo(java.lang.String peerIpAndPort, java.util.List<java.lang.String> groupList)Update the group list information of the node- Parameters:
peerIpAndPort
- Node ip and port informationgroupList
- Group list of nodes
-
getChannel
Channel getChannel() -
updateBlockNumberInfo
void updateBlockNumberInfo(java.lang.Integer groupId, java.lang.String peerInfo, java.math.BigInteger currentBlockNumber)update the block number information for the specified group- Parameters:
groupId
- the specified groupIdpeerInfo
- the info of the peerscurrentBlockNumber
- the current blockNumber
-
getGroupConnectionInfo
-
getGroupAvailablePeers
java.util.List<java.lang.String> getGroupAvailablePeers(java.lang.Integer groupId)get available ip and port info of specified group- Parameters:
groupId
- get the connection info of the group- Returns:
- the available ip and port info of the group
-
getBlockLimitByGroup
java.math.BigInteger getBlockLimitByGroup(java.lang.Integer groupId)Get block limit of specified group- Parameters:
groupId
- The specified groupId- Returns:
- the blockLimit(needed by the transaction module)
-
getGroupNodeList
java.util.Set<java.lang.String> getGroupNodeList(java.lang.Integer groupId)Get the node list of the specified group- Parameters:
groupId
- The group id- Returns:
- The node list that started the group
-
getGroupInfoByNodeInfo
java.util.List<java.lang.String> getGroupInfoByNodeInfo(java.lang.String nodeAddress)Get the group list of specified node- Parameters:
nodeAddress
- The ip and port info of the node- Returns:
- List of groups started by the node
-
sendMessageToGroup
Send a message to a node in the group and select the node with the highest block height in the group- Parameters:
groupId
- The group the message is sent tomessage
- The message to be sent- Returns:
- response of the node located in the specified group
-
sendMessageToGroupByRule
Send messages to nodes in the group according to specified rules (If multiple nodes are filtered out, only select one of them to send the message)- Parameters:
groupId
- The group the message is sent tomessage
- The message to be sentrule
- Rule for filtering the target nodes- Returns:
- callback to be called after receiving response
-
asyncSendMessageToGroup
void asyncSendMessageToGroup(java.lang.Integer groupId, Message message, ResponseCallback callback)Send a message to a node in the group and select the node with the highest block height in the group- Parameters:
groupId
- The group the message is sent tomessage
- The message to be sentcallback
- callback to be called after receiving response
-
asyncSendMessageToGroupByRule
void asyncSendMessageToGroupByRule(java.lang.Integer groupId, Message message, PeerSelectRule rule, ResponseCallback callback)Send messages to nodes in the group according to specified rules (If multiple nodes are filtered out, only select one of them to send the message)- Parameters:
groupId
- The group the message is sent tomessage
- The message to be sentrule
- Rules for filtering the target nodescallback
- Function to be called after receiving response
-
broadcastMessageToGroup
Broadcast messages to all the nodes of the specified group- Parameters:
groupId
- The group the message is sent tomessage
- The message to be sent
-
asyncSendTransaction
void asyncSendTransaction(java.lang.Integer groupId, Message transactionData, TransactionCallback callback, ResponseCallback responseCallback) -
eraseTransactionSeq
void eraseTransactionSeq(java.lang.String seq) -
getNodeVersion
-
getCryptoType
java.lang.Integer getCryptoType(java.lang.String peerInfo) -
getConfig
ConfigOption getConfig() -
updateNodeVersion
void updateNodeVersion() -
fetchGroupList
void fetchGroupList() -
stop
void stop() -
getLatestBlockNumberByGroup
java.math.BigInteger getLatestBlockNumberByGroup(java.lang.Integer groupId) -
registerBlockNotifyCallback
-
eraseBlockNotifyCallback
void eraseBlockNotifyCallback(java.lang.String registerId) -
getGroupList
java.util.Set<java.lang.Integer> getGroupList() -
setAmop
-