Package com.qfs.messenger
Interface IDistributedHierarchyManager
- All Superinterfaces:
IAgent,IDistributedAgent,IExtendedPluginValue,IMonitoredComponent
- All Known Implementing Classes:
DistributedHierarchyManager
Component of cube of query that can handle
IInitialDiscoveryMessage, ITransactionCommittedMessage or members (cube of data) leaving the cluster and apply associated
changes into the cube.- Author:
- ActiveViam
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for exception handlers to process an exception raised when consuming a message.Nested classes/interfaces inherited from interface com.quartetfs.fwk.IAgent
IAgent.ITransition, IAgent.State -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe plugin key of the default implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidImmediately triggers the removal task for the member broadcasting the receivedmessage.voidapplyInitialDiscoveryMessageAsync(IInitialDiscoveryMessage discoveryMessage) Applies the response to an initial discovery message and updates the current view ID to the given one (IInitialDiscoveryMessage.getViewId()).voidapplyInitialDiscoveryMessageAsync(CompositeDiscoveryMessage compositeDiscoveryMessage) Applies the response to an initial discovery message and updates the current view ID to the given one (IInitialDiscoveryMessage.getViewId()).voidApplies asynchronously, but in the required order, the data associated with the given remote transaction.booleancanReceiveDiscoveryMessage(String remoteAddress) Returns whether this manager can receive an additional initial discovery message from the given data cube.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.getPivot()Returns the QUERY cube the manager belongs to.booleanisDiscoveryApplied(String applicationId) Returns true if the schema of this application has already been received and applied.voidwaitForAllMessages(long timeoutMillis) Waits for all the query node messages to be processed.Methods inherited from interface com.quartetfs.fwk.IAgent
getProperties, getStatus, init, pause, resume, start, stopMethods inherited from interface com.qfs.messenger.IDistributedAgent
onMembersChangedMethods inherited from interface com.quartetfs.fwk.types.IExtendedPluginValue
getTypeMethods inherited from interface com.quartetfs.fwk.monitoring.IMonitoredComponent
getAvailableAttributes, getAvailableOperations, getMonitoredChildren, getStatistics
-
Field Details
-
DEFAULT_PLUGIN_KEY
The plugin key of the default implementation.- See Also:
-
-
Method Details
-
getPivot
IMultiVersionDistributedActivePivot getPivot()Returns the QUERY cube the manager belongs to. -
applyInitialDiscoveryMessageAsync
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 aremote data cube
-
applyInitialDiscoveryMessageAsync
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 aremote data cube
-
applyRemoteTransactionAsync
Applies asynchronously, but in the required order, the data associated with the given remote transaction.- Parameters:
message- TheITransactionCommittedMessagethat represents the remote commit
-
applyGoodbyeMessageRemovalAsync
Immediately triggers the removal task for the member broadcasting the receivedmessage.- Parameters:
message- TheGoodbyeMessagenotifying that a remote instance is leaving the cluster
-
getMostRecentAcknowledgedEpoch
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 theHelloMessage
-
isDiscoveryApplied
Returns true if the schema of this application has already been received and applied.- Parameters:
applicationId- the id of an application
-
canReceiveDiscoveryMessage
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
falseand the data cube should retry later.- Parameters:
remoteAddress- The address of the data cube- Returns:
trueif we can accept an initial discovery from this data cube,falseotherwise
-
waitForAllMessages
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 providedtimeoutMillis.
-