org.mmbase.module.builders
Class Netfiles
java.lang.Object
|
+--org.mmbase.module.core.MMTable
|
+--org.mmbase.module.core.MMObjectBuilder
|
+--org.mmbase.module.builders.Netfiles
- public class Netfiles
- extends MMObjectBuilder
The Netfiles builder stores information on files that need to be transferred
to other servers.
It is used in the CACHE PAGE routine, that is used to cache SCAN pages.
Information in NetFiles is used by a numbe rof VWMs (i.e. (PageMaster and ImageMaster), which schedules the transfer
of the files.
Each NetFile entry contains teh following information:
- code>filename : the name of the file
- code>mmserver : the server that should handle the file transfer
- code>service : the main 'service' to be performed.
Together with subservice, this determines the VWM that handles the transfer,
i.e. 'pages/main' is handled by the PageMaster VWM.
- code>subservice : the subservice to perform. i.e. in PageMaster, 'main' determines mirror sites and
schedules tasks for mirroring (by creating net netfile entries), while 'mirror'
performs the actual transfer to a mirror
Often one VWM handles mutliple subservices, but this is not a given.
- code>filesize : the size of the file. Not currently used, value is always -1
- code>ctime : probably the time of creation. Currently not used (for future development).
- code>ntime : probably the last change time. Currently not used (for future development).
- code>status : The state of the netfile entry. This can be a
STATUS_REQUEST when a file waits to be transferred,
STATUS_ON_ITS_WAY when it is being transferred, STATUS_DONE when
the transfer was handled, STATUS_CHANGED when a change occurerd in a file, (indicating it may
become elligible for resending), and STATUS_CALC_PAGE when the page needs to be recalculated
(by SCAN).
- code>crc : Cyclic Redundancy Check. For use in checking file validity. Currently not used (for future development)
- Version:
- 12 Mar 1997
- Author:
- Daniel Ockeloen
|
Field Summary |
static int |
STATUS_CALC_PAGE
Status for a netfile indicating a request to be recalculated |
static int |
STATUS_CHANGED
Status for a netfile indicating a change |
static int |
STATUS_DONE
Status for a netfile indicating its request has been handled |
static int |
STATUS_ON_ITS_WAY
Status for a netfile indicating its request is being handled |
static int |
STATUS_REQUEST
Status for a netfile indicating a service request |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
broadcastChanges, className, database, debug, description, descriptions, fields, NODE_MAX_SIZE, nodeCache, obj2type, OBJ2TYPE_MAX_SIZE, oType, replaceCache, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
|
Method Summary |
java.lang.String |
getGUIIndicator(java.lang.String field,
MMObjectNode node)
What should a GUI display for this node/field combo. |
boolean |
nodeLocalChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Called when a local node is changed. |
boolean |
nodeRemoteChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Called when a remote node is changed. |
| Methods inherited from class org.mmbase.module.core.MMObjectBuilder |
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, create, createAlias, created, debug, deleteNodeCache, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDefaultUrl, getDescription, getDescriptions, getDutchSName, getEditFields, getField, getFieldNames, getFields, getFullTableName, getFunctionParameters, getGUIIndicator, getHardNode, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNode, getNode, getNode, getNode, getNodeType, getNumberFromName, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTableName, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, getXMLSetup, hostname_function, init_obj2type, init, insert, insert, insertDone, isNodeCached, isVirtual, isXMLConfig, preCommit, preEdit, process, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeTmpNode, replace, safeCache, safeCommit, safeInsert, search, search, search, searchIn, searchIn, searchIn, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setClassName, setDBLayout_xml, setDBLayout, setDebug, setDefaults, setDescription, setDescriptions, setDutchSName, setInitParameter, setMaintainer, setMMBase, setPluralNames, setSearchAge, setSingularNames, setTableName, setValue, setValue, setVersion, setXmlConfig, setXMLPath, setXMLValues, signalNewObject, testValidData, toXML, waitUntilNodeChanged, wrap |
| Methods inherited from class org.mmbase.module.core.MMTable |
size |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATUS_REQUEST
public static final int STATUS_REQUEST
- Status for a netfile indicating a service request
STATUS_ON_ITS_WAY
public static final int STATUS_ON_ITS_WAY
- Status for a netfile indicating its request is being handled
STATUS_DONE
public static final int STATUS_DONE
- Status for a netfile indicating its request has been handled
STATUS_CHANGED
public static final int STATUS_CHANGED
- Status for a netfile indicating a change
STATUS_CALC_PAGE
public static final int STATUS_CALC_PAGE
- Status for a netfile indicating a request to be recalculated
Netfiles
public Netfiles()
getGUIIndicator
public java.lang.String getGUIIndicator(java.lang.String field,
MMObjectNode node)
- What should a GUI display for this node/field combo.
For "status', it returns a description of the current netfile state.
Otherwise it returns
null.
- Overrides:
getGUIIndicator in class MMObjectBuilder
- Parameters:
node - The node to displayfield - the name field of the field to display- Returns:
- the display of the node's field as a
String, null if not specified
nodeRemoteChanged
public boolean nodeRemoteChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
- Called when a remote node is changed.
This routine invokes the NetFileServ builder to handle the change (which involves
calling the VWM that handles the service).
Only active for certain servers.
The check what servers support this is currently specific for the VPRO and should be changed.
- Overrides:
nodeRemoteChanged in class MMObjectBuilder
- Parameters:
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- Returns:
true if maintenance was performed, false (the default) otherwise
nodeLocalChanged
public boolean nodeLocalChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
- Called when a local node is changed.
This routine invokes the NetFileServ builder to handle the change (which involves
calling the VWM that handles the service).
Only active for certain servers.
The check what servers support this is currently specific for the VPRO and should be changed.
- Overrides:
nodeLocalChanged in class MMObjectBuilder
- Parameters:
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- Returns:
true if maintenance was performed, false (the default) otherwise
MMBase 2002