|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--ocean.doc.OCEANDocNode
|
+--ocean.doc.Resource
|
+--ocean.doc.StableStorage
The StableStorage class is a wrapper for the Stable Storage trade proposal schema
construct. No distinction is made between types (i.e. hard drive, magnetic tape, etc.),
so this can be considered a generic description of storage.
| Field Summary | |
protected Memory |
availableSpace
Available space on this unit. |
protected Memory |
reqAmt
Amount requested. |
protected Memory |
totalSpace
Total space of this storage unit. |
| Fields inherited from class ocean.doc.Resource |
requested, resElem, reserved, resourceID, resourceType, schedule |
| Fields inherited from class ocean.doc.OCEANDocNode |
doc, rootNode |
| Constructor Summary | |
protected |
StableStorage(boolean r,
org.w3c.dom.Document d)
|
protected |
StableStorage(Memory m,
boolean r,
org.w3c.dom.Document d)
|
protected |
StableStorage(Memory avail,
Memory total,
boolean r,
org.w3c.dom.Document d)
|
protected |
StableStorage(org.w3c.dom.Node resNode,
org.w3c.dom.Node ssNode,
boolean r,
org.w3c.dom.Document d)
|
| Method Summary | |
protected void |
buildNode()
Build this Stable Storage construct's node tree, based on the attribute values of this StableStorage object. |
int |
compareTo(java.lang.Object o)
Compare this StableStorage to the given object. |
protected void |
extractMemFromNode(org.w3c.dom.Node ssNode)
Extract Memory information from a DOM Node, and set the class
attributes accordingly. |
Memory |
getAvailableSpace()
Get the available space. |
Memory |
getRequestAmount()
Get the requested amount. |
java.lang.String |
getResourceInfo()
Get a String which describes the state of this StableStorage. |
Memory |
getTotalSpace()
Get the total space. |
boolean |
isCompatible(Resource r)
Check if this StableStorage is compatible with the given resource. |
void |
setAvailableSpace(Memory mem)
Set the available space memory measurement. |
protected void |
setDocument(org.w3c.dom.Document d)
Set the DOM Document that is used to create and
modify this construct. |
void |
setRequestAmount(Memory mem)
Set the requested amount. |
void |
setTotalSpace(Memory mem)
Set the total space memory measurement. |
| Methods inherited from class ocean.doc.Resource |
createRoot, getID, getResIDNode, getSchedNode, getSchedule, getType, isRequested, isReserved, setID, setReserved, setSchedule, setType |
| Methods inherited from class ocean.doc.OCEANDocNode |
genID, getDocument, getRootNode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Memory totalSpace
protected Memory availableSpace
null if reqAmt is not null.protected Memory reqAmt
null if availableSpace is not null.| Constructor Detail |
protected StableStorage(boolean r,
org.w3c.dom.Document d)
protected StableStorage(org.w3c.dom.Node resNode,
org.w3c.dom.Node ssNode,
boolean r,
org.w3c.dom.Document d)
protected StableStorage(Memory m,
boolean r,
org.w3c.dom.Document d)
protected StableStorage(Memory avail,
Memory total,
boolean r,
org.w3c.dom.Document d)
| Method Detail |
protected void setDocument(org.w3c.dom.Document d)
OCEANDocNodeDocument that is used to create and
modify this construct.setDocument in class Resourceocean.doc.OCEANDocNoded - the new Docuemntpublic void setAvailableSpace(Memory mem)
mem - the new available space.public void setTotalSpace(Memory mem)
mem - the new total space.public Memory getAvailableSpace()
public Memory getTotalSpace()
public Memory getRequestAmount()
public void setRequestAmount(Memory mem)
protected void extractMemFromNode(org.w3c.dom.Node ssNode)
Node, and set the class
attributes accordingly.
protected void buildNode()
throws OCEANDocException
StableStorage object.buildNode in class ResourceOCEANDocException - if the OCEAN Trade Proposal schemas are violated.public boolean isCompatible(Resource r)
isCompatible in class Resourcefalse if r is not of type StableStorage, or if this
StableStorage is not a request, or if r is a request. true
if this StableStorage request amount is exceeded by the compared resource's available
amount.public int compareTo(java.lang.Object o)
StableStorage to the given object. Sorting is determined by
the following criteria in the given order.
compareTo in class Resourcepublic java.lang.String getResourceInfo()
StableStorage.getResourceInfo in class Resource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||