MatrixInfo

The MatrixInfo class is a representation of the matrix grid object (see GridObjectInfo). This provides operations for retrieving and creating grid objects in the system. MatrixInfo is retrieved using the built-in getMatrix() function. Write capability is dependent on the context in which getMatrix() is called. For example, in a joblet process on a resource, creating new grid objects is not supported.

Inheritance Structure

  extended bycom.gridion.jdl.GridObjectInfo      extended bycom.gridion.jdl.MatrixInfo

Fields

Inherited from class com.gridion.jdl.BinaryConstraint:

MATCH_MODE_EXACT, MATCH_MODE_GLOB, MATCH_MODE_REGEXP

See BinaryConstraint.

Methods:

Detail:

createGridObject(String objectType, String objectName)

Create a Grid object using supplied type and name. Built-in “object type” variable constants:.

      TYPE_USER
      TYPE_RESOURCE
      TYPE_REPOSITORY

Parameters: objectType - Grid object type objectName - Grid object name.

Returns: GridObjectInfo for new object.

Raises: Exception - if object already exists.

createGroup(String gridObjectType, String groupName)

Create and return a group grid object using the supplied grid object type and group name (see GroupInfo). The grid object type must be one of the known types and the group must not already exist

Parameters: gridObjectType - One of the known grid object types. groupName - Name of group to retrieve. It must not exist..

Returns: Group grid object that was created.

Raises: Exception - if the group already exists.

createResource(String name)

Create a physical resource grid object with supplied name. See ResourceInfo.

Parameters: name - Name of new resource grid object.

Returns: New resource grid object.

Raises: Exception - if resource already exists.

createResource(String name, String type, boolean addSuffix)

Create a resource grid object using supplied Resource type. The Resource type must be one of the constants from ResourceInfo. ResourceInfo.TYPE_FIXED,ResourceInfo.TYPE_VM_INSTANCE,ResourceInfo.TYPE_VM_TEMPLATE .

Parameters: name - Name of new resource grid object type - One of the Resource types addSuffix - true to make the name unique by automatically adding a numeric suffix.

Returns: New resource grid object.

Raises: Exception - if the resource already exists.

createResource(String name, String type, boolean addSuffix)

Creates and returns a group grid object using the supplied grid object type and group name. The grid object type must be one of the known types and the group must not already exist. See ResourceInfo.

Parameters: gridObjectType - One of the known grid object types groupName - Name of group to retrieve. It must not exist.

Returns: Group grid object that was created.

Raises: Exception - if the group already exists.

getActiveJobs()

Retrieve a list of job instance frid objects representing the currently active job instances. This includes job instances that are queued.

Returns: List of job instance grid objects, list is empty if no jobs are active.

getGridObject(String objectType, String objectName)

Retrieve a named grid object of the requested type. Example to retrieve the grid object for the user named 'foo' and print the value of the user object’s id fact:

      gridObject = getMatrix().getGridObject(TYPE_USER,"foo")
      print gridObject.getFact("user.id")

Built-in "object type" variable constants:

      TYPE_USER
      TYPE_JOB
      TYPE_RESOURCE
      TYPE_VMHOST
      TYPE_REPOSITORY
      TYPE_USERGROUP
      TYPE_JOBGROUP
      TYPE_RESOURCEGROUP
      TYPE_VMHOSTGROUP
      TYPE_REPOSITORYGROUP

Parameters: objectType - Grid object type objectName - Grid object name.

Returns: GridObjectInfo representing the grid object or None if object does not exist.

Raises: Exception - if supplied object type is invalid.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

size()

Return number of rows in this ParameterSpace.

Returns: Number of rows.

See Also