|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.jini.example.ray.ex1.genericWorker.TaskEntry
Parent class for generic tasks. A worker thread will repeatedly
take a TaskEntry object from the space, invoke its
execute method, and write the returned
Entry into the space with the lease time returned by
responseLeaseTime. If execute returns
null, no value will be written -- it is assumed that a
null return value means that the task requires no
response in the space.
| Constructor Summary | |
TaskEntry()
|
|
| Method Summary | |
net.jini.core.entry.Entry |
execute(com.sun.jini.collection.WeakTable cache)
Execute whatever task the entry requires. |
long |
responseLeaseTime()
The lease time that will be requested for any response from execute. |
void |
verbose(boolean showMessages)
Turn on verbose messages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TaskEntry()
| Method Detail |
public net.jini.core.entry.Entry execute(com.sun.jini.collection.WeakTable cache)
null is returned, nothing is written into the
space. If a subclass of TaskEntry has not
overridden this method, a RuntimeException will be
generated when execute is invoked.
The WeakTable entry can be used to store cached
state between one entry's use of execute and
another of a related entry. Weak references are stored, so
execute must be able to execute properly if the
holder doesn't have a value for the key.
public long responseLeaseTime()
execute. The default is for ten minutes.
public void verbose(boolean showMessages)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||