The interface IDSSCubeAdmin is used to manage cubes cache in Strategy SDK 9.3.1 - 10.x. The following code can be used to obtain this interface from the IDSSServerAdmin11 object then poll the cache for its status:
Private Sub Form_Load()
Dim oServerAdmin As IDSSServerAdmin11
Dim oProjectList As IDSSProjectInstances
Dim oProject As IDSSProjectInstance
Dim nProjID As Integer
Dim oReportCacheAdmin As IDSSReportCacheAdmin2
'Obtain Server Admin from the Session object
Set oServerAdmin = MySession.ServerAdmin
'Obtain the list of projects.
Set oProjectList = oServerAdmin.ProjectInstances(DssServerRefreshNo)
'From the project list, obtain the desired project. An iteration could be used to locate the project by name
Set oProject = oProjectList.ItemByIndex(1)
'Extract the internal project ID, which is diferent to the DSSID of the Project object
nProjID = oProject.ID
'Get the Cube Admin
Dim oCubeAdmin As IDSSCubeAdmin
Dim oCubeInfos As IDSSCubeInfos
Dim oCubeInfo As IDSSCubeInfo
Const CUBE_ID As String = "FBEB802D4BF97F94AC2137911E5B3E09"
Set oCubeAdmin = oServerAdmin.CubeAdministrator(nProjID)
Set oCubeInfos = oCubeAdmin.GetCubeInfos(CUBE_ID, DssCubeInfoDetail)
strOut ("Cache Count: " & oCubeInfos.Count)
Set oCubeInfo = oCubeInfos.Item(1)
strOut ("Cube Name: " & oCubeInfo.CubeName)
Dim status As Integer
status = oCubeInfo.status
If ((status And DssCubeActive) = DssCubeActive ) Then
strOut ("Cube Status: Active")
End If
If ((status And DssCubeDirty) = DssCubeDirty) Then
strOut ("Cube Status: Dirty")
End If
If ((status And DssCubeLoaded) = DssCubeLoaded) Then
strOut ("Cube Status: Loaded")
End If
If ((status And DssCubeProcessing) = DssCubeProcessing) Then
strOut ("Cube Status: Processing")
End If
If ((status And DssCubeReady) = DssCubeReady) Then
strOut ("Cube Status: Ready")
End If
If ((status And DssCubeImported) = DssCubeImported) Then
strOut ("Cube Status: Imported")
End If
If ((status And DssCubeForeign) = DssCubeForeign) Then
strOut ("Cube Status: Foreign")
End If
If ((status And DssCubeInfoDirty) = DssCubeInfoDirty) Then
strOut ("Cube Status: Info Dirty")
End If
If ((status And DssCubeLoadPending) = DssCubeLoadPending) Then
strOut ("Cube Status: Load Pending")
End If
If ((status And DssCubePersisted) = DssCubePersisted) Then
strOut ("Cube Status: Persisted")
End If
If ((status And DssCubeReserved) = DssCubeReserved) Then
strOut ("Cube Status: Reserved")
End If
If ((status And DssCubeUnloadPending) = DssCubeUnloadPending) Then
strOut ("Cube Status: Unload Pending")
End If
End Sub
Private Sub strOut(str As String)
strMessage = strMessage & vbCrLf & str
txtXML.Text = strMessage
End Sub