Package com.microstrategy.webapi
Class ACMRefreshClusterMembershipConsolidator
- java.lang.Object
-
- com.microstrategy.webapi.ACMRefreshClusterMembershipConsolidator
-
- All Implemented Interfaces:
ACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
public class ACMRefreshClusterMembershipConsolidator extends java.lang.Object implements ACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microstrategy.webapi.ACMConsolidator
ACMConsolidator.SESSION_MODE, ACMConsolidator.STRING_DATA_FORMAT
-
-
Constructor Summary
Constructors Constructor Description ACMRefreshClusterMembershipConsolidator(java.util.Collection<com.microstrategy.webapi.CDSSXMLClusterNode> iClusterNodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToConsolidation(java.lang.String iJson)
addToConsolidation is how the results of all all the XML API calls are notified to the ACMConslidator.java.util.Optional<com.microstrategy.webapi.CDSSXMLCluster>
getCluster()
getCluster returns the final consolidated results from the multiple RCM calls as a IDSSXMLClusterjava.util.Collection<com.microstrategy.webapi.ClusterMemberInfo>
getClusterMembershipInfos()
getCluster returns the final consolidated results from the multiple RCM calls as a vector of ClusterMemberInfo.java.lang.String
getConsolidatedStringData()
The operation is O(CxNxP) where C is the number of clusters, N is the number of nodes in the cluster, and P is the number of projects on each node.
This method is called by the ACMConsolidator infrastructure and is guaranteed to be called after the threads have been combined.ACMConsolidator.STRING_DATA_FORMAT
getResultStringDataFormat()
ACMConsolidator.SESSION_MODE
getSessionMode()
java.lang.String
remoteCall(ACMDestination.SessionlessTargetDestination iTargetDestination, java.util.Collection<java.lang.String> iProjectIds)
remoteCall is where the ACMConsolidator implements the XML API call to a specific IServer.boolean
useCachedValue(ACMDestination.SessionlessTargetDestination iTargetDestination)
useCachedValue allows the ACMConsolidator to skip some IServers.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.webapi.ACMConsolidator
extractPage, notifyClusterNodeChoices, overrideClusterNodes, setTime
-
-
-
-
Method Detail
-
remoteCall
public java.lang.String remoteCall(ACMDestination.SessionlessTargetDestination iTargetDestination, java.util.Collection<java.lang.String> iProjectIds) throws MSTRWebAPIException
Description copied from interface:ACMConsolidator
remoteCall is where the ACMConsolidator implements the XML API call to a specific IServer. The ACMConsolidator may need to construct the XML and sends/receive it to/from an IServer. The result MUST be in a "string data format" such as xml or Json
The ACMDistributor infrastructure creates threads for each IServer and calls remoteCall for each IServer (on different threads). Thus, this call is fully free threaded. So be wary, you may need a lock.- Specified by:
remoteCall
in interfaceACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
- Parameters:
iTargetDestination
- information about the target IServer. For XML API calls that require a session, the session id is in this structure.iProjectIds
- the set of project ids to access on this IServer. It may be empty but never null- Returns:
- the XML or JSON returned from the XML API call
- Throws:
MSTRWebAPIException
-
addToConsolidation
public void addToConsolidation(java.lang.String iJson) throws MSTRWebAPIException
Description copied from interface:ACMConsolidator
addToConsolidation is how the results of all all the XML API calls are notified to the ACMConslidator. The ACMConsolidator should collect all the data in preparation for consolidation. Although this call may happen in parallel with remoteCall, this call is serially called to itself. Thus, you probably won't need a lock- Specified by:
addToConsolidation
in interfaceACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
- Throws:
MSTRWebAPIException
-
getConsolidatedStringData
public java.lang.String getConsolidatedStringData() throws MSTRWebAPIException
The operation is O(CxNxP) where C is the number of clusters, N is the number of nodes in the cluster, and P is the number of projects on each node.
This method is called by the ACMConsolidator infrastructure and is guaranteed to be called after the threads have been combined.- Specified by:
getConsolidatedStringData
in interfaceACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
- Returns:
- Throws:
MSTRWebAPIException
-
getCluster
public java.util.Optional<com.microstrategy.webapi.CDSSXMLCluster> getCluster()
getCluster returns the final consolidated results from the multiple RCM calls as a IDSSXMLCluster- Returns:
-
getClusterMembershipInfos
public java.util.Collection<com.microstrategy.webapi.ClusterMemberInfo> getClusterMembershipInfos() throws MSTRWebAPIException
getCluster returns the final consolidated results from the multiple RCM calls as a vector of ClusterMemberInfo. Note, any nodes found from a different cluster are NOT returned here.
This method is called by the orignal caller on a single thread (after the threads have been combined).- Returns:
- Throws:
MSTRWebAPIException
-
getSessionMode
public ACMConsolidator.SESSION_MODE getSessionMode()
- Specified by:
getSessionMode
in interfaceACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
-
getResultStringDataFormat
public ACMConsolidator.STRING_DATA_FORMAT getResultStringDataFormat()
- Specified by:
getResultStringDataFormat
in interfaceACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
-
useCachedValue
public boolean useCachedValue(ACMDestination.SessionlessTargetDestination iTargetDestination)
Description copied from interface:ACMConsolidator
useCachedValue allows the ACMConsolidator to skip some IServers. This is useful when the data hasn't changed and you still have a cache.- Specified by:
useCachedValue
in interfaceACMConsolidator<ACMDestination.SessionlessDestination,ACMDestination.SessionlessTargetDestination>
- Parameters:
iTargetDestination
- information about the target IServer. For XML API calls that require a session, the session id is in this structure.- Returns:
- true to tell the ACMDistributor infrastructure to skip this IServer, false to tell it to create a thread and call the XML API on is IServer
-
-