JobletInfo

JobletInfo is a representation of the joblet grid object created when a job calls schedule() to create joblets. This class provides access to a joblet's factset and operations on a joblet such as cancellation and sending events to a joblet that is running on a resource. The separate Joblet class defines execution on a resource.

Methods

Detail:

cancel()

Cancel this joblet if it is waiting or running. Has no effect if joblet is finished.

cancel(String reason)

Cancel this joblet if it is waiting or running. Has no effect if joblet is finished.

fail()

Fail a running joblet to force failover to another resource. If joblet has reached retry limit, then joblet ends in failed state. Has no effect if joblet is finished.

fail(String reason)

Fail a running joblet to force failover to another resource. If joblet has reached retry limit, then joblet ends in failed state. Has no effect if joblet is finished.

Parameters: reason - string to store in job log.

getParameterSpace(int jobletNumber)

Retrieve a joblet’s JobletParameterSpace instance. The JobletParameterSpace is created when schedule() is invoked with a JobletParameterSpace. The scheduler creates slices of the ParameterSpace for each joblet.

Parameters: jobletNumber - Joblet number to retrieve JobletParameterSpace for

Returns: jobletNumber - Joblet number to retrieve JobletParameterSpace for

getResource()

Retrieve the ResourceInfo that is running this joblet.

Returns: ResourceInfo instance.

Raises: Exception - if joblet is not running on a resource.

retry()

Retry a running joblet to force failover to another resource. If joblet has reached retry limit, then joblet ends in failed state. Has no effect if joblet is finished.

retry(String reason)

Retry a running joblet to force failover to another resource. If joblet has reached retry limit, then joblet ends in failed state. Has no effect if joblet is finished.

Parameters: reason - string to store in job log.

sendEvent(String name, PyDictionary params)

Sends an event from job to a joblet running on a resource. Joblet must be running on a resource or this event is ignored. Typically used to communicate state changes to a long running joblet.

Parameters: name - Name of event params - Dictionary of parameters to send to joblet event

Raises: .PyException - if event does not exist or joblet is not running

Inherited from class com.gridion.jdl.GridObjectInfo:

deleteFact, factExists, getFact, getFactLastModified, getFactNames, refresh, setArrayFact, setBooleanArrayFact, setDateArrayFact, setDateFact, setFact, setIntegerArrayFact, setRealArrayFact, setStringArrayFact, setTimeArrayFact, setTimeFact

See GridObjectInfo.

See Also

Javadoc: JobletInfo