public class ImageMaster extends Vwm implements MMBaseObserver, VwmServiceInterface
| Modifier and Type | Field and Description |
|---|---|
(package private) Vector<aFile2Copy> |
files
List of files to transfer.
|
(package private) boolean |
first |
(package private) Hashtable |
properties |
(package private) ImagePusher |
pusher
The background thread that takes care of of the files scheduled for transfer.
|
(package private) Object |
syncobj |
| Constructor and Description |
|---|
ImageMaster()
Constructor for ImageMaster
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
doMainRequest(MMObjectNode filenode)
Handles a main subservice on an image.
|
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.
|
ByteFieldContainer |
getCkeyNode(ImageCaches bul,
String ckey)
Return a @link{ ByteFieldContainer} containing the bytes and object number
for the cached image with a certain ckey, or null, if not cached.
|
String |
getProperty(String key)
Retrieves a named property of a server.
|
boolean |
handleMain(MMObjectNode filenode,
int status,
String ctype)
Handles a images/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 an images/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, releaseClientHashtable properties
boolean first
Object syncobj
Vector<aFile2Copy> files
ImagePusher (which purges duplicate
files and handles the remaining transfers).ImagePusher pusher
public boolean probeCall()
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 ByteFieldContainer getCkeyNode(ImageCaches bul, String ckey)
ckey - teh ckey to search forpublic 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 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 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 serviceMMBase 1.9-SNAPSHOT - ${javadoctimestamp}