Interface IMultiVersionDistributedActivePivot
-
- All Superinterfaces:
IAgent,IContinuouslyQueryable,IExtendedPluginValue,IHasId,IMemoryMonitored,IMultiVersion,IMultiVersionActivePivot,IMultiVersionOperations,IQueryable,IRebuildable<IActivePivotVersion>,ITransactionalMultiVersion
- All Known Implementing Classes:
MultiVersionDistributedActivePivot
public interface IMultiVersionDistributedActivePivot extends IMultiVersionActivePivot
A distributedIMultiVersionActivePivot.- Author:
- ActiveViam
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.quartetfs.fwk.IAgent
IAgent.ITransition, IAgent.State
-
-
Field Summary
Fields Modifier and Type Field Description static StringPLUGIN_KEYPlugin Key.-
Fields inherited from interface com.quartetfs.biz.pivot.IMultiVersionActivePivot
AGGREGATE_PROVIDER, AGGREGATES_CACHE, CONTINUOUS_QUERY_ENGINE, DATA_TYPE, DEFAULT_TYPE, QUERY_MANAGER, QUERY_PLAN
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleanallDiscoveriesApplied()Check whether all discoveries have been applied or not.IActivePivotVersioncommit(IEpoch ignoredEpoch)Deprecated.since 5.5.0static IMultiVersionDistributedActivePivotcreatePivot(String key, IDistributedActivePivotInstanceDescription distributionDescription, IEpochCreator epochCreator, IAdvancedEpochManager epochManager, IPartitioningManager partitioningManager, ITimeSupplier clock, IBranchPermissionsManager branchPermissionsManager, IDomainDictionaryProvider dictionaryProvider)Creates an instance of multi-version Distributed ActivePivot of the given key.Map<String,String>getClusterMembersRestAddresses()Computes the physical addresses of all the data cubes, using their identifiers within the cluster and the propertiesActiveViamProperty.DATA_CUBE_REST_ENDPOINT_PORT_PROPERTY,ActiveViamProperty.DATA_CUBE_REST_ENDPOINT_SUFFIX_PROPERTY.IDistributedActivePivotContextgetContext()Returns thecontext.IDistributedActivePivotDescriptiongetDescription()Gets theIDistributedActivePivotDescription, that is valid for all versions of the distributed pivot.Map<String,List<String>>getDistributedApplicationInformation()Returns The distributing fields index by their application name.default Map<String,List<String>>getDistributedApplicationInformations()Deprecated, for removal: This API element is subject to removal in a future version.UsegetDistributedApplicationInformation()insteadIDistributedHierarchyManagergetDistributedHierarchyManager()Returns the distributedHierarchyManager used to forward the remote transactions to thepivot.IAdvancedEpochManagergetEpochManager()Get the epoch manager of this distributed ActivePivot.static IFactoryValue<IMultiVersionDistributedActivePivot>getFactory(String key)Gets the factory to createIMultiVersionDistributedActivePivotof the given key.IDistributedActivePivotVersiongetHead()Get the latest version of the distributed ActivePivot in the master branch.IDistributedActivePivotVersiongetHead(String branch)Get the latest version of the distributed ActivePivot in the master branch.IDistributedMessengergetMessenger()Returns Themessengerused for communicating with the other instances.IDistributedActivePivotVersiongetMostRecentVersion()/!\ For internal use only.IDistributedActivePivotTransactiongetOrCreateTransaction()Returns the current transaction.
The result is nevernullcontrary toITransactionalMultiVersion.getTransaction().IDistributedActivePivotTransactiongetTransaction()Returns the current transaction.IDistributedActivePivotVersiononInitialRemoteCommit(List<? extends IDimension<? extends IHierarchy>> mainDimensions, IEpoch epoch, long viewId, String remoteAddress, String applicationId, String remotePivotId, Properties properties)Merges the delta dimensions from a remote instance's initial commit into the underlyingIDistributedActivePivot's cube's maindimensionsand notifies the listeners.IDistributedActivePivotVersiononRemoteCommit(List<List<? extends IDimension<? extends IHierarchy>>> contributionDeltas, List<List<? extends IDimension<? extends IHierarchy>>> removalDeltas, IEpoch epoch, long viewId, String remoteAddress, String remotePivotId, Properties properties)Merges the delta hierarchies from a remote instance's commit into the underlyingIDistributedActivePivot's cube's mainhierarchiesand notifies the listeners.IDistributedActivePivotVersionremoveMembersFromCube(Set<String> membersToRemove, long viewId, boolean discard)Removes all the contributions from the given cluster members and notifies the listeners.booleanuseApplicationMeasureGroups()Returns the current value of theIDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_GROUPSproperty.booleanuseApplicationMeasureGroupsSuffix()Returns the current value of theIDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_GROUPS_SUFFIXproperty.booleanuseApplicationMeasureNames()Returns the current value of theIDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_NAMESproperty.-
Methods inherited from interface com.quartetfs.fwk.IAgent
getProperties, getStatus, init, pause, resume, start, stop
-
Methods inherited from interface com.quartetfs.fwk.query.IContinuouslyQueryable
getContinuousQuery, registerContinuousQuery, registerContinuousQuery, registeredContinuousQueryNames, unregisterAllContinuousQueries, unregisterContinuousQuery
-
Methods inherited from interface com.quartetfs.fwk.types.IExtendedPluginValue
getType
-
Methods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatistic
-
Methods inherited from interface com.quartetfs.biz.pivot.IMultiVersionActivePivot
awaitNotifications, awaitNotifications, awaitNotifications, cancelUserQueries, createCompositeTransactionInfo, getAggregatesContinuousQueryEngine, getBranches, getBranchPermissionsManager, getDrillthroughContinuousQueryEngine, getHeads, getHierarchies, getId, getLastActivityTime, getListeners, getMissingLocationsSolver, getReadableBranches, getVersionHistory, isDistributed, setTransactionProperties
-
Methods inherited from interface com.quartetfs.fwk.query.IQueryable
execute, getSupportedQueries
-
Methods inherited from interface com.quartetfs.biz.pivot.IRebuildable
rebuild
-
Methods inherited from interface com.qfs.multiversion.ITransactionalMultiVersion
rollback
-
-
-
-
Field Detail
-
PLUGIN_KEY
static final String PLUGIN_KEY
Plugin Key.- See Also:
- Constant Field Values
-
-
Method Detail
-
createPivot
static IMultiVersionDistributedActivePivot createPivot(String key, IDistributedActivePivotInstanceDescription distributionDescription, IEpochCreator epochCreator, IAdvancedEpochManager epochManager, IPartitioningManager partitioningManager, ITimeSupplier clock, IBranchPermissionsManager branchPermissionsManager, IDomainDictionaryProvider dictionaryProvider)
Creates an instance of multi-version Distributed ActivePivot of the given key.- Parameters:
partitioningManager- manager to use to create new partitioningsclock- time supplier to use to access time in this ActivePivotdictionaryProvider- the pivot's dictionary provider
-
getFactory
static IFactoryValue<IMultiVersionDistributedActivePivot> getFactory(String key)
Gets the factory to createIMultiVersionDistributedActivePivotof the given key.
-
getMostRecentVersion
IDistributedActivePivotVersion getMostRecentVersion()
Description copied from interface:IMultiVersionActivePivot/!\ For internal use only. Users must useIMultiVersionActivePivot.getHead(String).Returns the most recent version that exists across all branches. This function may return a shadow version.
Retrieves the latest (i.e. current) version of the object.
- Specified by:
getMostRecentVersionin interfaceIMultiVersion- Specified by:
getMostRecentVersionin interfaceIMultiVersionActivePivot- Returns:
- the latest version of the object
- See Also:
IMultiVersionActivePivot.getHead(),IMultiVersionActivePivot.getHead(String)
-
getHead
IDistributedActivePivotVersion getHead()
Get the latest version of the distributed ActivePivot in the master branch.IAsOfEpochcontext value is ignored and not supported by distributed cubes.
OnlyIBranchcontext value is (from AP 5.6 onwards).- Specified by:
getHeadin interfaceIMultiVersionActivePivot- Returns:
- latest version
- See Also:
IEpoch.MASTER_BRANCH_NAME
-
getHead
IDistributedActivePivotVersion getHead(String branch) throws UnknownBranchException
Get the latest version of the distributed ActivePivot in the master branch.IAsOfEpochcontext value is ignored and not supported by distributed cubes.- Specified by:
getHeadin interfaceIMultiVersionActivePivot- Parameters:
branch- the name of a branch- Returns:
- latest version in the master branch
- Throws:
UnknownBranchException- if a branch other than the master one is specified
-
getTransaction
IDistributedActivePivotTransaction getTransaction()
Description copied from interface:ITransactionalMultiVersionReturns the current transaction.- Specified by:
getTransactionin interfaceIMultiVersionActivePivot- Specified by:
getTransactionin interfaceITransactionalMultiVersion- Returns:
- the current transaction or
nullwhen there is no transaction - See Also:
ITransactionalMultiVersion.getOrCreateTransaction()
-
getOrCreateTransaction
IDistributedActivePivotTransaction getOrCreateTransaction()
Description copied from interface:ITransactionalMultiVersionReturns the current transaction.
The result is nevernullcontrary toITransactionalMultiVersion.getTransaction().THIS METHOD SHOULD BE CALLED ONLY IF
IMultiVersionOperations.commit(IEpoch)(orITransactionalMultiVersion.rollback()) IS GUARANTEED TO BE CALLED otherwise this could cause a memory leak if the transaction holds a version (because the multiversion will keep the transaction).- Specified by:
getOrCreateTransactionin interfaceIMultiVersionActivePivot- Specified by:
getOrCreateTransactionin interfaceITransactionalMultiVersion- Returns:
- the current transaction
- See Also:
ITransactionalMultiVersion.getTransaction()
-
getContext
IDistributedActivePivotContext getContext()
Description copied from interface:IMultiVersionActivePivotReturns thecontext.This context applies to all the ActivePivot versions.
- Specified by:
getContextin interfaceIMultiVersionActivePivot
-
getEpochManager
IAdvancedEpochManager getEpochManager()
Get the epoch manager of this distributed ActivePivot.- Returns:
- the epoch manager in use.
-
commit
@Deprecated IActivePivotVersion commit(IEpoch ignoredEpoch)
Deprecated.since 5.5.0Unsupported method. Use one of the following method instead:- Specified by:
commitin interfaceIMultiVersionActivePivot- Specified by:
commitin interfaceIMultiVersionOperations- Parameters:
ignoredEpoch- the epoch associated with this commit- Returns:
- the version that prevails after this commit (possibly an untouched current version if the commit had absolutely no impact on the state)
-
onRemoteCommit
IDistributedActivePivotVersion onRemoteCommit(List<List<? extends IDimension<? extends IHierarchy>>> contributionDeltas, List<List<? extends IDimension<? extends IHierarchy>>> removalDeltas, IEpoch epoch, long viewId, String remoteAddress, String remotePivotId, Properties properties) throws MergeException
Merges the delta hierarchies from a remote instance's commit into the underlyingIDistributedActivePivot's cube's mainhierarchiesand notifies the listeners.We do not need to send the dimensions because a remote commit does not change the structure of the cube.
This creates a new version of this pivot.
- Parameters:
contributionDeltas- contributionsDelta The hierarchies containing the new members. They may come from severalITransactionCommittedMessagein which case the size of the list is higher than 1. The list is aligned with removalDeltas.removalDeltas- The hierarchies containing the removed members They may come from severalITransactionCommittedMessagein which case the size of the list is higher than 1. The list is aligned with contributionDeltas.epoch- The epoch of the remote member corresponding to the commitviewId- The ID of theviewassociated with this commitremoteAddress- The address of the remote instance that have seen the deltasremotePivotId- The ID of the remote pivot instance that have seen the deltasproperties- The properties- Returns:
- The new version after this commit.
- Throws:
MergeException- if an exception is encountered during the transaction
-
onInitialRemoteCommit
IDistributedActivePivotVersion onInitialRemoteCommit(List<? extends IDimension<? extends IHierarchy>> mainDimensions, IEpoch epoch, long viewId, String remoteAddress, String applicationId, String remotePivotId, Properties properties) throws MergeException
Merges the delta dimensions from a remote instance's initial commit into the underlyingIDistributedActivePivot's cube's maindimensionsand notifies the listeners.This creates a new version of this pivot.
- Parameters:
mainDimensions- The remote contributionsepoch- The epoch associated with these delta hierarchies on the remote pivot.viewId- The ID of theviewassociated with this commitremoteAddress- address of the remote instance that is responsible for this initial discoveryapplicationId- The application to which the remote instance belongsremotePivotId- the name of the pivot of the remote instanceproperties- The properties- Returns:
- The new version after this commit.
- Throws:
MergeException- if an exception is encountered during the transaction
-
removeMembersFromCube
IDistributedActivePivotVersion removeMembersFromCube(Set<String> membersToRemove, long viewId, boolean discard) throws MergeException
Removes all the contributions from the given cluster members and notifies the listeners.- Parameters:
membersToRemove- The addresses of the members to removeviewId- The ID of theviewassociated with this commitdiscard- True to remove all contributions from the given remote instances.- Returns:
- The new version after this commit.
- Throws:
MergeException- if an exception is encountered during the transaction
-
getDescription
IDistributedActivePivotDescription getDescription()
Gets theIDistributedActivePivotDescription, that is valid for all versions of the distributed pivot.- Specified by:
getDescriptionin interfaceIMultiVersionActivePivot
-
getMessenger
IDistributedMessenger getMessenger()
Returns Themessengerused for communicating with the other instances.
-
getDistributedHierarchyManager
IDistributedHierarchyManager getDistributedHierarchyManager()
Returns the distributedHierarchyManager used to forward the remote transactions to thepivot. It returnsnullif the cube is not started.
-
useApplicationMeasureGroups
boolean useApplicationMeasureGroups()
Returns the current value of theIDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_GROUPSproperty.If set to
true, distributed measures and hierarchies have the ID of the local pivot they come from as measureGroup.- Returns:
- The current value of the
IDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_GROUPSproperty.
-
useApplicationMeasureNames
boolean useApplicationMeasureNames()
Returns the current value of theIDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_NAMESproperty.If set to
true, measures names have the id of the local pivot they come from as suffix.- Returns:
- The current value of the
IDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_NAMESproperty
-
useApplicationMeasureGroupsSuffix
boolean useApplicationMeasureGroupsSuffix()
Returns the current value of theIDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_GROUPS_SUFFIXproperty.If set to
true, local pivot IDs will be appended to locally defined measure groups.- Returns:
- The current value of the
IDistributedActivePivotInstanceDescription.APPLICATION_MEASURE_GROUPS_SUFFIXproperty
-
getDistributedApplicationInformations
@Deprecated(forRemoval=true, since="6.0.1") @DeprecatedApi(forRemoval="6.1.0", rationale="typo") default Map<String,List<String>> getDistributedApplicationInformations()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetDistributedApplicationInformation()insteadReturns The distributing fields index by their application name.- See Also:
getDistributedApplicationInformation()
-
getDistributedApplicationInformation
Map<String,List<String>> getDistributedApplicationInformation()
Returns The distributing fields index by their application name.If an application does not have any distributing field, the associated value is
null.
-
allDiscoveriesApplied
default boolean allDiscoveriesApplied()
Check whether all discoveries have been applied or not.Notice a discovery is considered as applied if all measures and hierarchies of an application have been received at least once since the QUERY cube has been started. If an application ('myAPP') is disappearing from the cluster after its associated discovery has been applied, the QUERY cube is still considering that this discovery has been applied. That is to say in this case,
getDistributedHierarchyManager().isDiscoveryApplied("myAPP")still returns true.One can use
QueryCubeListenerto be notify when such changes occur.- Returns:
- true if all discoveries have been applied, false otherwise.
-
getClusterMembersRestAddresses
Map<String,String> getClusterMembersRestAddresses()
Computes the physical addresses of all the data cubes, using their identifiers within the cluster and the propertiesActiveViamProperty.DATA_CUBE_REST_ENDPOINT_PORT_PROPERTY,ActiveViamProperty.DATA_CUBE_REST_ENDPOINT_SUFFIX_PROPERTY.- Returns:
- A map with the data cube names as keys and their address as values.
-
-