Interface IDistributedHierarchyManager

    • Field Detail

      • DEFAULT_PLUGIN_KEY

        static final String DEFAULT_PLUGIN_KEY
        The plugin key of the default implementation.
        See Also:
        Constant Field Values
    • Method Detail

      • applyInitialDiscoveryMessageAsync

        void applyInitialDiscoveryMessageAsync​(CompositeDiscoveryMessage compositeDiscoveryMessage)
        Applies the response to an initial discovery message and updates the current view ID to the given one (IInitialDiscoveryMessage.getViewId()). This is done asynchronously.
        Parameters:
        compositeDiscoveryMessage - the message to apply that contains informations about a remote data cube
      • applyInitialDiscoveryMessageAsync

        void applyInitialDiscoveryMessageAsync​(IInitialDiscoveryMessage discoveryMessage)
        Applies the response to an initial discovery message and updates the current view ID to the given one (IInitialDiscoveryMessage.getViewId()). This is done asynchronously.
        Parameters:
        discoveryMessage - the message to apply that contains informations about a remote data cube
      • applyRemoteTransactionAsync

        void applyRemoteTransactionAsync​(ITransactionCommittedMessage message)
        Applies asynchronously, but in the required order, the data associated with the given remote transaction.
        Parameters:
        message - The ITransactionCommittedMessage that represents the remote commit
      • applyGoodbyeMessageRemovalAsync

        void applyGoodbyeMessageRemovalAsync​(GoodbyeMessage message)
        Immediately triggers the removal task for the member broadcasting the received message.
        Parameters:
        message - The GoodbyeMessage notifying that a remote instance is leaving the cluster
      • getMostRecentAcknowledgedEpoch

        IEpoch getMostRecentAcknowledgedEpoch​(String remoteAddress,
                                              long viewId)
        Returns the last known epoch of the remote cube or null if no message between the two instances has been sent & applied.
        Parameters:
        remoteAddress - the address of the remote instance (cube of data)
        viewId - the view id of the HelloMessage
      • isDiscoveryApplied

        boolean isDiscoveryApplied​(String applicationId)
        Returns true if the schema of this application has already been received and applied.
        Parameters:
        applicationId - the id of an application
      • canReceiveDiscoveryMessage

        boolean canReceiveDiscoveryMessage​(String remoteAddress)
        Returns whether this manager can receive an additional initial discovery message from the given data cube.

        If there are too many pending initial discoveries, this method will return false and the data cube should retry later.

        Parameters:
        remoteAddress - The address of the data cube
        Returns:
        true if we can accept an initial discovery from this data cube, false otherwise
      • waitForAllMessages

        void waitForAllMessages​(long timeoutMillis)
                         throws TimeoutException,
                                InterruptedException
        Waits for all the query node messages to be processed.
        Parameters:
        timeoutMillis - Maximum time to wait in Milliseconds
        Throws:
        InterruptedException - If issue with Thread.sleep()
        TimeoutException - If waited longer than maximum provided timeoutMillis.