jet.server.api.crd
Class CubeInfo

java.lang.Object
  extended by jet.server.api.crd.CRDInfo
      extended by jet.server.api.crd.CubeInfo
All Implemented Interfaces:
java.io.Serializable

public class CubeInfo
extends CRDInfo

See Also:
Serialized Form

Field Summary
static short LOCATION_IN_MEMORY
          Indicates a cube's location: in memory (value=1).
static short LOCATION_ON_DISK
          Indicates a cube's location: on disk (value=2).
static short LOCATION_UNKNOWN
          Indicates a cube's location: unknown (value=0).
 
Fields inherited from class jet.server.api.crd.CRDInfo
CACHE_TYPE_BV, CACHE_TYPE_BVANDDETAIL, CACHE_TYPE_DETAIL, QUERY_TYPE_HIERARCHICAL, QUERY_TYPE_IMPORTED_SQL, QUERY_TYPE_PARAMETER, QUERY_TYPE_QUERY, QUERY_TYPE_QUEYR, QUERY_TYPE_STORED_PROCEDURE, QUERY_TYPE_USER_DEFINED, STATUS_BUILDING, STATUS_COMPLETED, STATUS_DISABLED, STATUS_PENDING, STATUS_UPDATING
 
Constructor Summary
CubeInfo(java.lang.String catalogPath, java.lang.String dataSource, int queryType, java.lang.String queryName, java.lang.String bvName)
          Constructs CubeInfo with specified catalog path, data source name, query type, query name, and BV name.
CubeInfo(java.lang.String catalogPath, java.lang.String dataSource, int queryType, java.lang.String queryName, java.lang.String bvName, int cacheType)
          Constructs CubeInfo with specified catalog path, data source name, query type, query name, BV name, and cache type.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares if the parameter object is equal to this one.
 long getActualUsedMemory()
          get actual used memory size for the cube.
 java.lang.String getBVName()
          get BV name which used to create cube.
 boolean getCanSwaptoDisk()
          check if can swap to disk when no enough memory to generate cube.
 short getLocation()
          get location of a cube, return value may be may be LOCATION_IN_MEMORY, LOCATION_ON_DISK, or LOCATION_UNKNOWN.
 double getMaxAllowMemory()
          get maximum memory size allowed for the cube.
 java.util.Vector<CubeUsage> listCubeUsage()
          List cube usage currently.
 void setCanSwaptoDisk(boolean canSwaptoDisk)
          set if can swap to disk when no enough memory to generate cube.
 void setMaxAllowMemory(double maxMemory)
          set maximum memory size allowed for the cube.
 java.lang.String toString()
          Converts this object to string information.
 
Methods inherited from class jet.server.api.crd.CRDInfo
getCacheType, getCatalogName, getCatalogPath, getCRDKey, getCreatedTime, getDataSource, getLastModified, getLoginUser, getParamFile, getParamValues, getPassword, getPasswords, getQueryName, getQueryType, getRunDetails, getRuntimeParamValues, getRunTimes, getStatus, getTaskId, getUserName, getUserNames, isLazy, setCacheType, setCatalogPath, setCreatedTime, setDataSource, setLastModified, setLazy, setLoginUser, setParamFile, setPassword, setPasswords, setQueryName, setQueryType, setTaskId, setUserName, setUserNames
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCATION_UNKNOWN

public static final short LOCATION_UNKNOWN
Indicates a cube's location: unknown (value=0).

See Also:
Constant Field Values

LOCATION_IN_MEMORY

public static final short LOCATION_IN_MEMORY
Indicates a cube's location: in memory (value=1).

See Also:
Constant Field Values

LOCATION_ON_DISK

public static final short LOCATION_ON_DISK
Indicates a cube's location: on disk (value=2).

See Also:
Constant Field Values
Constructor Detail

CubeInfo

public CubeInfo(java.lang.String catalogPath,
                java.lang.String dataSource,
                int queryType,
                java.lang.String queryName,
                java.lang.String bvName)
Constructs CubeInfo with specified catalog path, data source name, query type, query name, and BV name.

Parameters:
catalogPath - catalog path.
dataSource - data source.
queryType - query type.
queryName - query name.
bvName - BV name

CubeInfo

public CubeInfo(java.lang.String catalogPath,
                java.lang.String dataSource,
                int queryType,
                java.lang.String queryName,
                java.lang.String bvName,
                int cacheType)
Constructs CubeInfo with specified catalog path, data source name, query type, query name, BV name, and cache type.

Parameters:
catalogPath - catalog path.
dataSource - data source.
queryType - query type.
queryName - query name.
bvName - BV name
cacheType - cache type,
Method Detail

getBVName

public java.lang.String getBVName()
get BV name which used to create cube.

Returns:
BV name.

listCubeUsage

public java.util.Vector<CubeUsage> listCubeUsage()
List cube usage currently.

Returns:
current cube usages.
See Also:
CubeUsage

getMaxAllowMemory

public double getMaxAllowMemory()
get maximum memory size allowed for the cube.

Returns:
maximum memory size allowed for the cube, unit is MB.

getActualUsedMemory

public long getActualUsedMemory()
get actual used memory size for the cube.

Returns:
actual used memory size for the cube, unit is byte. return 0L if value of CRDInfo.getStatus() is not CRDInfo.STATUS_COMPLETED.

setMaxAllowMemory

public void setMaxAllowMemory(double maxMemory)
set maximum memory size allowed for the cube.

Parameters:
maxMemory - memory size allowed for the cube, unit is MB.

getLocation

public short getLocation()
get location of a cube, return value may be may be LOCATION_IN_MEMORY, LOCATION_ON_DISK, or LOCATION_UNKNOWN.

Returns:
active cube's location, if the cube is not active, return LOCATION_UNKNOWN.

getCanSwaptoDisk

public boolean getCanSwaptoDisk()
check if can swap to disk when no enough memory to generate cube.

Returns:
true if can swap, otherwise cannot.

setCanSwaptoDisk

public void setCanSwaptoDisk(boolean canSwaptoDisk)
set if can swap to disk when no enough memory to generate cube.

Parameters:
canSwaptoDisk - true if can swap, otherwise cannot.

equals

public boolean equals(java.lang.Object obj)
Compares if the parameter object is equal to this one.

Overrides:
equals in class CRDInfo
Parameters:
obj - the object to be compared
Returns:
true if the parameter object is equal to this object, otherwise return false.

toString

public java.lang.String toString()
Converts this object to string information.

Overrides:
toString in class CRDInfo