|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.applications.mmbob.ForumMMBaseSyncer
public class ForumMMBaseSyncer
The syncer for Nodes used in MMBob. There can be different types of syncing mechanisms:
slow for things like statistics and fast for really important things like postings, userinfo, etc
This object is responsible for calling 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.
| Field Summary | |
|---|---|
(package private) int |
delayTime
|
(package private) Thread |
kicker
|
(package private) int |
sleepTime
|
| Constructor Summary | |
|---|---|
ForumMMBaseSyncer(int sleepTime,
int maxQueue,
int startDelay)
Contructor |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
Thread kicker
final int sleepTime
final int delayTime
| Constructor Detail |
|---|
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?)| Method Detail |
|---|
public void init()
public void start()
public void run()
run in interface Runnablepublic 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()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||