Class TOMSender

  • All Implemented Interfaces:
    ReplyReceiver, java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    ServiceProxy

    public abstract class TOMSender
    extends java.lang.Object
    implements ReplyReceiver, java.io.Closeable, java.lang.AutoCloseable
    This class is used to multicast messages to replicas and receive replies.
    • Constructor Detail

      • TOMSender

        public TOMSender​(int processId,
                         java.lang.String configHome,
                         KeyLoader loader)
        Creates a new instance of TOMulticastSender
        Parameters:
        processId - Process id for this client
        configHome - Configuration directory for BFT-SMART
        loader - Used to load signature keys from disk
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • getProcessId

        public int getProcessId()
      • generateRequestId

        public int generateRequestId​(TOMMessageType type)
      • generateOperationId

        public int generateOperationId()
      • TOMulticast

        public void TOMulticast​(TOMMessage sm)
      • TOMulticast

        public void TOMulticast​(byte[] m,
                                int reqId,
                                int operationId,
                                TOMMessageType reqType)
      • sendMessageToTargets

        public void sendMessageToTargets​(byte[] m,
                                         int reqId,
                                         int operationId,
                                         int[] targets,
                                         TOMMessageType type)
      • getSession

        public int getSession()
      • getReplyQuorum

        public int getReplyQuorum()
        Retrieves the required quorum size for the amount of replies
        Returns:
        The quorum size for the amount of replies