public class PageMaster extends Vwm implements MMBaseObserver, VwmServiceInterface
VwmServiceInterface.| Modifier and Type | Field and Description |
|---|---|
(package private) FileCopier |
filecopier
Thread that handles the actual file transfers.
|
(package private) Queue |
files2copy
Queue containing the file-copy tasks that need to be performed by
filecopier |
(package private) boolean |
first |
(package private) Vector |
mirrornodes
Cache for mirror servers
|
(package private) Object |
syncobj |
| Constructor and Description |
|---|
PageMaster()
Constructor for the PageMaster VWM.
|
| Modifier and Type | Method and Description |
|---|---|
void |
calcPage(String url)
Recalculate a page.
|
boolean |
doMainRequest(MMObjectNode filenode)
Handles a main subservice on a page.
|
boolean |
fileChange(String number,
String ctype)
Handles a service-request on a file, registered in the netfiles builder.
|
boolean |
fileChange(String service,
String subservice,
String filename)
Schedules a service-request on a file.
|
Vector |
getMirrorNodes(String service)
Retrieves a list of Mirror Servers.
|
String |
getProperty(String machine,
String key)
Retrieves a named property of a server.
|
boolean |
handleMain(MMObjectNode filenode,
int status,
String ctype)
Handles a pages/main service request.
|
void |
handleMainCheck(String service,
String subservice,
String filename)
Schedules a netfile object to be send to its mirror sites.
|
boolean |
handleMirror(MMObjectNode filenode,
int status,
String ctype)
Handles a pages/mirror service request.
|
boolean |
nodeChanged(String machine,
String number,
String builder,
String ctype)
Called when a local or remote node is changed.
|
boolean |
nodeLocalChanged(String machine,
String number,
String builder,
String ctype)
Called when a local node is changed.
|
boolean |
nodeRemoteChanged(String machine,
String number,
String builder,
String ctype)
Called when a remote node is changed.
|
boolean |
probeCall()
Performs general periodic maintenance.
|
addClient, claim, debug, failed, getName, getVwmNode, init, parseProperties, performed, performTask, putTask, releaseClient, rollback, run, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClient, init, releaseClientboolean first
Object syncobj
Queue files2copy
filecopierFileCopier filecopier
Vector mirrornodes
public boolean probeCall()
probeCall in interface VwmProbeInterfaceprobeCall in class Vwmtrue if maintenance was performed, false otherwisepublic boolean nodeRemoteChanged(String machine, String number, String builder, String ctype)
nodeRemoteChanged in interface MMBaseObservernodeRemoteChanged in class Vwmmachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=newtruepublic boolean nodeLocalChanged(String machine, String number, String builder, String ctype)
nodeLocalChanged in interface MMBaseObservernodeLocalChanged in class Vwmmachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=newtruepublic boolean nodeChanged(String machine, String number, String builder, String ctype)
machine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=newtruepublic boolean fileChange(String service, String subservice, String filename)
probeCall() method.fileChange in interface VwmServiceInterfaceservice - the service to be performedsubservice - the subservice to be performedfilename - the filename to servicetrue if maintenance was performed, false otherwisepublic boolean fileChange(String number, String ctype)
handleMirror(org.mmbase.module.core.MMObjectNode, int, java.lang.String)
or handleMain(org.mmbase.module.core.MMObjectNode, int, java.lang.String).fileChange in interface VwmServiceInterfacenumber - Number of the node in the netfiles buidler than contain service request information.ctype - the type of change on that node ("c" : node was changed)truepublic boolean handleMirror(MMObjectNode filenode, int status, String ctype)
filenode - the filenet node that contains the service requeststatus - the current status of the nodectype - the type of change on that node ("c" : node was changed)truepublic boolean handleMain(MMObjectNode filenode, int status, String ctype)
doMainRequest(org.mmbase.module.core.MMObjectNode)filenode - the netfiles node that contains the service requeststatus - the current status of the nodectype - the type of change on that node ("c" : node was changed)truepublic boolean doMainRequest(MMObjectNode filenode)
filenode - the netfiles node with the original (main) requestpublic void handleMainCheck(String service, String subservice, String filename)
service - the service to be performedsubservice - the subservice to be performedfilename - the filename to servicepublic String getProperty(String machine, String key)
machine - name of the serverkey - name of the property to retrievepublic void calcPage(String url)
url - of the page to cachepublic Vector getMirrorNodes(String service)
service - preseumably the service to query for. Unused.Vector containing mmserver nodes that act as mirror server for this serviceMMBase 1.9-SNAPSHOT - ${javadoctimestamp}