public class ForumMMBaseSyncer extends Object implements Runnable
Node.commit(), of the MMBase nodes involved in
MMBob. It does that only to spare the MMBase database. It maintains a queue of 'dirty nodes', and
sometimes calls commit on one and cleans it up.| Modifier and Type | Field and Description |
|---|---|
(package private) int |
delayTime |
(package private) Thread |
kicker |
(package private) int |
sleepTime |
| Constructor and Description |
|---|
ForumMMBaseSyncer(int sleepTime,
int maxQueue,
int startDelay)
Contructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
doWork()
Main work loop
Commit the nodes in the syncQueue to the database
|
void |
init()
init()
|
void |
nodeDeleted(Node node)
remove the given node from the syncQueue
|
(package private) String |
printCurrentContent() |
void |
run()
Main loop, exception protected
|
void |
shutdownSync() |
void |
start()
Starts the main Thread.
|
void |
syncNode(Node node)
add the given node to the syncQueue, to be synchronized at synchronization-time
|
String |
toString() |
Thread kicker
final int sleepTime
final int delayTime
public ForumMMBaseSyncer(int sleepTime,
int maxQueue,
int startDelay)
sleepTime - time to sleepmaxQueue - maximum number of nodes in the syncQueue (not implemented)startDelay - delay (not implemented?)public void init()
public void start()
public void doWork()
public void shutdownSync()
public void nodeDeleted(Node node)
node - node that has to be removed from the syncQueuepublic void syncNode(Node node)
node - the node that must added to the syncQueueString printCurrentContent()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}