|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gigaspaces.grid.worker.AbstractSpaceWorker com.gigaspaces.grid.worker.TaskWorker
public class TaskWorker
The TaskWorker provides an implementation of a GigaSpaceWorker that
repeatedly takes Task objects from a JavaSpace and invokes the
Task.execute()
method.
The TaskWorker additionally allows a the use of a WeakHashMap or a
HashMap to store information processed by
Task
entry objects as
follows:
HashMap
will be created.
Otherwise a WeakHashMap
will be used. The default is to use a
WeakHashMap
.
Field Summary | |
---|---|
static java.lang.Long |
defaultLeaseTime
|
static long |
defaultTransactionLeaseTime
|
protected net.jini.core.entry.Entry |
template
|
Fields inherited from class com.gigaspaces.grid.worker.AbstractSpaceWorker |
---|
COMPONENT |
Constructor Summary | |
---|---|
TaskWorker(org.jini.rio.core.jsb.ServiceBeanContext context)
Create a TaskWorker |
Method Summary | |
---|---|
protected net.jini.core.entry.Entry |
doExecute(net.jini.core.entry.Entry entry,
java.util.Map map)
Perform the execute on the Task Entry and return an Entry |
protected boolean |
getKeepAlive()
Get the keepAlive property |
protected java.util.Map |
getTaskEntryMap()
Get the parameter Map |
protected java.lang.Thread |
getWorkerThread()
Set the running worker thread property |
void |
run()
|
void |
setSpace(net.jini.space.JavaSpace space)
Override parent's setSpace to obtain a transaction manager if this utility is configured to use transaction support |
protected void |
setWorkerThread(java.lang.Thread thread)
Set the running worker thread property |
void |
shutdown()
Shutdown the worker |
Methods inherited from class com.gigaspaces.grid.worker.AbstractSpaceWorker |
---|
getBackLog, getID, getSpace, getStackTraceAsString, getWatch, getWatchRegistry, setID, setWatchRegistry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected net.jini.core.entry.Entry template
public static final long defaultTransactionLeaseTime
public static final java.lang.Long defaultLeaseTime
Constructor Detail |
---|
public TaskWorker(org.jini.rio.core.jsb.ServiceBeanContext context) throws java.lang.Exception
context
-
java.lang.Exception
Method Detail |
---|
public void setSpace(net.jini.space.JavaSpace space)
setSpace
in interface GigaSpaceWorker
setSpace
in class AbstractSpaceWorker
GigaSpaceWorker.setSpace(JavaSpace)
public void shutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
protected boolean getKeepAlive()
protected void setWorkerThread(java.lang.Thread thread)
protected java.lang.Thread getWorkerThread()
protected java.util.Map getTaskEntryMap()
protected net.jini.core.entry.Entry doExecute(net.jini.core.entry.Entry entry, java.util.Map map) throws java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
public void run()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |