|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.builders.Vwmtasks
public class Vwmtasks
Virtual Web Master task builder.
This builder holds the tasks that need to be performed by the various VWMs (which are registered in
the VWMS builder). It also runs a taskscheduler that periodically cehcks whether any new tasks need to be handled
Task nodes have a number of fields that define if, when, and how a task is to be performed.
These fields are :
Requested Machine: the machine on which the task is to be performed (wantedcpu)
VWM: the name of the vwm (as known in the VWMS builder) trhat should perform the task
Status : the state of the task (i.e. requesting, claimed, error, done)
Claiming Machine : the cpu that claimed the task for performance (claimedcpu)
Wanted Time : time at which to start the task
Changed Time : time at which the task was last changed
Expire Time : time at which the task expires
Task : name of the task
Id : unknown
Data : field for including properties/parameters
| Field Summary | |
|---|---|
(package private) Thread |
kicker
Thread in which the task scheduler runms |
(package private) int |
lastchecked
Time (in seconds since 1/1/1970) that the builder last checked for new tasknodes to en handled |
boolean |
replaceCache
|
static int |
SLEEP_TIME
The interval (in seconds) between checks for new nodes by the task scheduler. |
static int |
STATUS_CLAIMED
Status value for a task that is being performed |
static int |
STATUS_DONE
Status value for a task that was succesfully performed |
static int |
STATUS_ERROR
Status value for a task that failed to be performed |
static int |
STATUS_REQUEST
Status value for a task that requests to be performed |
static int |
STATUS_TIMEOUT
Status value for a task that timed out |
(package private) Hashtable |
vwm_cache
|
(package private) Vwms |
vwms
Reference to the VWMs builder |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
|---|
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_INDICATOR, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
|---|
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions |
| Constructor Summary | |
|---|---|
Vwmtasks()
|
|
| Method Summary | |
|---|---|
String |
getGUIIndicator(MMObjectNode node)
What should a GUI display for this node. |
String |
getGUIIndicator(String field,
MMObjectNode node)
What should a GUI display for this node/field combo. |
protected void |
getVwmTasks()
Task scheduling routine. |
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
MMObjectNode |
preCommit(MMObjectNode node)
This method is called just before an actual write to the database is performed. |
void |
run()
VWM maintenance scheduler. |
void |
start()
Starts the thread for the task scheduler |
void |
stop()
Stops the thread for the task scheduler Sets the kicker field to null, which causes the run method to terminate. |
| Methods inherited from class org.mmbase.module.core.MMTable |
|---|
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STATUS_REQUEST
public static final int STATUS_CLAIMED
public static final int STATUS_DONE
public static final int STATUS_TIMEOUT
public static final int STATUS_ERROR
public static final int SLEEP_TIME
public boolean replaceCache
Thread kicker
Vwms vwms
Hashtable vwm_cache
int lastchecked
| Constructor Detail |
|---|
public Vwmtasks()
| Method Detail |
|---|
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()public void start()
public void stop()
public void run()
getVwmTasks() method, after which the thread sleeps
for a number of seconds as set in SLEEP_TIME.
run in interface Runnablepublic MMObjectNode preCommit(MMObjectNode node)
preCommit in class MMObjectBuildernode - The node to be committed.
public String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - The node to display
String
public String getGUIIndicator(String field,
MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - The node to displayfield - the name field of the field to display
String, null if not specifiedprotected void getVwmTasks()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||