|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.zos.jdl.GridObjectInfo
public class GridObjectInfo
The GridObjectInfo class is the base class representation of all Grid Objects in the system. This provides accessors and setters to a Grid Object's fact set.
| Method Summary | |
|---|---|
void |
deleteFact(java.lang.String factname)
Remove a fact from this grid object. |
boolean |
factExists(java.lang.String factname)
Determine if given factname exists in this grid object. |
org.python.core.PyObject |
getFact(java.lang.String factname)
Retrieve the value of the named fact on this grid object. |
long |
getFactLastModified(java.lang.String factname)
Retrieve the last modified timestamp for a fact. |
org.python.core.PyList |
getFactNames()
Retrieve a list of all fact names for this grid object. |
void |
refresh()
Refresh fact set for this grid object. |
void |
setArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set an Array typed fact on this grid object. |
void |
setBooleanArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set a Boolean Array fact on this grid object. |
void |
setDateArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set an Date Array fact on this grid object. |
void |
setDateFact(java.lang.String factname,
org.python.core.PyObject value)
Set the value of a fact of type Date. |
void |
setFact(java.lang.String factname,
org.python.core.PyObject value)
Set the value of a fact. |
void |
setIntegerArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set a Integer Array fact on this grid object. |
void |
setRealArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set a Real Array fact on this grid object. |
void |
setStringArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set a String Array fact on this grid object. |
void |
setTimeArrayFact(java.lang.String factname,
org.python.core.PyList list)
Set a Time Array fact on this grid object. |
void |
setTimeFact(java.lang.String factname,
org.python.core.PyObject value)
Set the value of a fact of type Time. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public org.python.core.PyList getFactNames()
public org.python.core.PyObject getFact(java.lang.String factname)
Example of retrieving the value of a job argument fact (from quickie example):
def job_started_event(self):
numJoblets = self.getFact("jobargs.numJoblets")
Example of retrieving the value of a date fact and displaying in a readable form:
def job_started_event(self):
d = self.getFact("jobinstance.time.submitted")
print "time.ctime(d/1000)=",time.ctime(d/1000)
factname - Name of fact to retrieve value for
java.lang.Exception - if fact does not exist
public void setFact(java.lang.String factname,
org.python.core.PyObject value)
factname - Name of fact to setvalue - Value of fact to set
public void setArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same type
public void setTimeFact(java.lang.String factname,
org.python.core.PyObject value)
Example to set a jobinstance time fact to indicate 5 minutes elapsed:
def job_started_event(self):
self.setTimeFact("myTimeFact",5*60)
factname - Name of fact to setvalue - Time value of fact to set.
public void setTimeArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same type
public void setDateFact(java.lang.String factname,
org.python.core.PyObject value)
Example to set a jobinstance date fact to indicate the current date and time:
def job_started_event(self):
import time
self.setDateFact("myDateFact",time.ctime())
factname - Name of fact to setvalue - Integer or floating poitn number in seconds since the epoch
public void setDateArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same type
public void setStringArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same type
public void setIntegerArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same type
public void setRealArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same type
public void setBooleanArrayFact(java.lang.String factname,
org.python.core.PyList list)
factname - Factname to setlist - Fact value to set. Must be a Python List where all elements
are the same typepublic boolean factExists(java.lang.String factname)
factname - Name of fact to check
public long getFactLastModified(java.lang.String factname)
Example to retrieve a fact's last modified timestamp and print it in a displayable form in the job log
def job_started_event(self):
last_modified_secs = self.getFact("job.timeout") / 1000
import time
print time.ctime(last_modified_secs)
factname - job instance fact name
public void deleteFact(java.lang.String factname)
factname - fact to remove
java.lang.Exception - if fact does not exist or fact is not deleteablepublic void refresh()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||