com.platform.ego
Interface Resource


public interface Resource

The interface provides a mechanism to control a resource of one allocation.

Resources are physical and logical entities that are used by applications in order to run. A resource of a particular type is associated with attributes. For example, a host has attributes of memory, CPU utilization, operating system type, etc. Platform EGO deals with resource allocation at the granularity of physical hosts, logical sub-divisions of the physical host known as cpu slots, software license features, and includes an extensible resource model to cover storage space, network bandwidth, or data sets as resources whose use is controlled under policies.

Version:
1.2.3

Method Summary
 Activity[] getActivities()
          Get all activities that run on the resource.
 Allocation getAllocation()
          Get one allocation to which the resource belongs.
 java.lang.String getName()
          Get name of resource.
 int getSlotsNumber()
          Get number of slots of resource.
 ResourceState getState()
          Get state of resource.
 java.lang.String getType()
          Get type of resource.
 Activity startActivity(ActivityRequest activityReq, ActivityCallbackHandler activityHandler)
          The operation is used by an EGO client to request the execution of an activity on the resource.
 

Method Detail

startActivity

Activity startActivity(ActivityRequest activityReq,
                       ActivityCallbackHandler activityHandler)
                       throws EGOException
The operation is used by an EGO client to request the execution of an activity on the resource.

Parameters:
activityReq - : provide the execution parameters of the activity, such as command line, the OS user id used to execute the activity, shell limits, etc.
activityHandler - : specifies handler of callback.
Returns:
an Activity object.
Throws:
EGOException

getName

java.lang.String getName()
Get name of resource.

Returns:
name of resource.

getType

java.lang.String getType()
Get type of resource.

Returns:
type of resource.

getSlotsNumber

int getSlotsNumber()
Get number of slots of resource.

Returns:
number of slots.

getState

ResourceState getState()
Get state of resource.

Returns:
state of resource.

getActivities

Activity[] getActivities()
Get all activities that run on the resource.

Returns:
array of activity.

getAllocation

Allocation getAllocation()
Get one allocation to which the resource belongs.

Returns:
one Allocation object.


Copyright (C) 1992-2007 Platform Computing Corporation