|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.module.builders.vwms.Vwm
org.mmbase.module.builders.vwms.ImageMaster
public class ImageMaster
A VWM that manages image files by scheduling them to be send to one or more mirror sites. Requests for scheduling is done in the netfile builder. This VWM handles those netfile requests whose service is 'images'. Available subservices are 'main' and 'mirror'. Requests for file copy are checked periodically. The result is one or more requests for a 'mirror' service, which then result in a file copy request, which is handled in a separate thread. Before copying, images are retrieved from Icache and converted to an 'asis' file (this is the file that actually gets copied).
| Field Summary | |
|---|---|
(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
|
| Fields inherited from class org.mmbase.module.builders.vwms.Vwm |
|---|
clients, kicker, name, probe, sleeptime, Vwms, wvmnode |
| Constructor Summary | |
|---|---|
ImageMaster()
Constructor for ImageMaster |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.mmbase.module.builders.vwms.Vwm |
|---|
addClient, claim, debug, failed, getName, getVwmNode, init, parseProperties, performed, performTask, putTask, releaseClient, rollback, run, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.module.builders.vwms.VwmInterface |
|---|
addClient, init, releaseClient |
| Field Detail |
|---|
Hashtable properties
boolean first
Object syncobj
Vector<aFile2Copy> files
ImagePusher (which purges duplicate
files and handles the remaining transfers).
ImagePusher pusher
| Constructor Detail |
|---|
public ImageMaster()
| Method Detail |
|---|
public boolean probeCall()
probeCall().
probeCall in interface VwmProbeInterfaceprobeCall in class Vwmtrue if maintenance was performed, false otherwise
public 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'=new
true
public 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'=new
true
public 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'=new
true
public 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 service
true if maintenance was performed, false otherwise
public 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)
true
public ByteFieldContainer getCkeyNode(ImageCaches bul,
String ckey)
ckey - teh ckey to search for
public 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)
true
public 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) request
public 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 key)
key - name of the property to retrieve
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||