Package com.microstrategy.webapi
Class ACMSDKHelpers
- java.lang.Object
-
- com.microstrategy.webapi.ACMSDKHelpers
-
public class ACMSDKHelpers extends java.lang.Object
ACMSDKHelpers has miscellaneous semi-generic helper methods
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ACMSDKHelpers.ConfigSessionProjectsResolver
static class
ACMSDKHelpers.IServerSessionIdleTimeout
static class
ACMSDKHelpers.UserAffinity
-
Constructor Summary
Constructors Constructor Description ACMSDKHelpers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(IDSSXMLSessionId iSessionId, ACMMasterSessionBundle iMasterSessionBundle, ACMClusterInfo iClusterInfo)
close will close the Session to the IServer.static void
closeJustThisOne(IDSSXMLSessionId iSessionId, ACMMasterSessionBundle iMasterSessionBundle, java.util.Optional<ACMClusterInfo> iClusterInfoOpt)
closeJustThisOne
will close exactly the session.static java.util.Map<java.lang.String,java.lang.String>
getAllPidsInCluster(IDSSXMLServerSession iServerSession)
getAllPidsInCluster returns a map of all the project ids in the cluster that the input iServerSession belongs to.static void
invalidateRefreshClusterMembership()
static boolean
portCompare(int iPort1, int iPort2)
static int
portCompareTo(int iPort1, int iPort2)
static int
portResolve(int iPort)
portResolve uses the port as is, unless the port is 0.static boolean
portSpecified(int iPort1, int iPort2)
portSpecified returns true if all ports are specified.static void
refreshAllClusterInfo()
-
-
-
Method Detail
-
invalidateRefreshClusterMembership
public static void invalidateRefreshClusterMembership()
-
refreshAllClusterInfo
public static void refreshAllClusterInfo()
-
close
public static void close(IDSSXMLSessionId iSessionId, ACMMasterSessionBundle iMasterSessionBundle, ACMClusterInfo iClusterInfo)
close will close the Session to the IServer. If the session is a Project Session Id or a Configuration Session Id, then just that session id is closed. If the session is a Master Session Id, then all Project and Configuration sessions under it will also be closed.- Parameters:
iSessionId
- a Project, Configuration, or Master session idiMasterSessionBundle
- holds GSS credentials, needed to communicate with the kerberos serveriClusterInfo
- holds connectivity information to the session id
-
closeJustThisOne
public static void closeJustThisOne(IDSSXMLSessionId iSessionId, ACMMasterSessionBundle iMasterSessionBundle, java.util.Optional<ACMClusterInfo> iClusterInfoOpt)
closeJustThisOne
will close exactly the session. If it's a project session, then only that project portion will be closed. If it's a config session, then close the whole session.- Parameters:
iSessionId
-iMasterSessionBundle
-iClusterInfo
-
-
getAllPidsInCluster
public static java.util.Map<java.lang.String,java.lang.String> getAllPidsInCluster(IDSSXMLServerSession iServerSession) throws MSTRWebAPIException
getAllPidsInCluster returns a map of all the project ids in the cluster that the input iServerSession belongs to. The key is on Project ID, the value is on Project Name The operation is O(N) where N is the number of projects in the cluster- Parameters:
iServerSession
- the session id to use to communicate with the IServer- Returns:
- a hashmap containing all the project ids in the cluster.
- Throws:
MSTRWebAPIException
-
portCompare
public static boolean portCompare(int iPort1, int iPort2)
-
portCompareTo
public static int portCompareTo(int iPort1, int iPort2)
-
portSpecified
public static boolean portSpecified(int iPort1, int iPort2)
portSpecified returns true if all ports are specified. An unspecified port (a port with a negative value) indicates that the ports should not be used to compare with each other- Parameters:
iPort1
-iPort2
-- Returns:
-
portResolve
public static int portResolve(int iPort)
portResolve uses the port as is, unless the port is 0. When the port is 0 it converts it into the default port (34952)- Parameters:
iPort
-- Returns:
-
-