Interface GroupManagerService

All Known Implementing Classes:
GroupManagerServiceImpl

public interface GroupManagerService
  • 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 information
      groupList - 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 groupId
      peerInfo - the info of the peers
      currentBlockNumber - the current blockNumber
    • getGroupConnectionInfo

      java.util.List<ConnectionInfo> getGroupConnectionInfo​(java.lang.Integer groupId)
    • 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

      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 group
      Parameters:
      groupId - The group the message is sent to
      message - The message to be sent
      Returns:
      response of the node located in the specified group
    • sendMessageToGroupByRule

      Response 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)
      Parameters:
      groupId - The group the message is sent to
      message - The message to be sent
      rule - 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 to
      message - The message to be sent
      callback - 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 to
      message - The message to be sent
      rule - Rules for filtering the target nodes
      callback - Function to be called after receiving response
    • broadcastMessageToGroup

      void broadcastMessageToGroup​(java.lang.Integer groupId, Message message)
      Broadcast messages to all the nodes of the specified group
      Parameters:
      groupId - The group the message is sent to
      message - 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

      NodeVersion getNodeVersion​(java.lang.String peerInfo)
    • 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

      java.lang.String registerBlockNotifyCallback​(BlockNumberNotifyCallback callback)
    • eraseBlockNotifyCallback

      void eraseBlockNotifyCallback​(java.lang.String registerId)
    • getGroupList

      java.util.Set<java.lang.Integer> getGroupList()
    • setAmop

      void setAmop​(Amop amop)