|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.provision.OpBucket
A helper class created to hold lists of ResourceOps. The "ordered" flag indicats that the ops must be processed in the order they appear in the list.
One of these will be created for each Application object encountered during a breadth first search that is marked as being ordered.
A single unordered bucket is created for those resources that are not contained in ordered applications.
A single bucket for delete ops is currently created, order will be specified according to dependency pointers between the ops themselves.
Field Summary | |
static java.lang.String |
code_id
|
Constructor Summary | |
OpBucket(boolean ordered)
|
Method Summary | |
void |
add(ResourceOp op)
Add an op to this bucket. |
void |
assimilate(OpBucket other)
Merge one bucket with another. |
int |
checkFinished()
Return the number of OPs in this bucket that are not yet finished. |
void |
clear()
Clear the ops list in this bucket. |
void |
clearDependencies()
Remove any resource dependnecies between OPs in this bucket, and the corresponding ResourceInfo objects. |
void |
dumpFile(java.lang.String file)
|
void |
failDependentOps(ResourceOp failedOp)
This op has failed, so we should fail all dependent ops |
ResourceOp |
find(java.lang.String id)
Search for an OP in this bucket that references the resource with the given ID. |
ResourceOp |
getNextDependentOp()
Return the next delete OP that may be processed. |
ResourceOp |
getNextOp()
Return the next available OP for processing, or null if we're waiting for processing of a previous OP to complete. |
int |
getOpCount()
Return the number of ops in the bucket. |
java.util.List |
getOps()
Return the list of ops. |
void |
init()
Called by provisioning engine when we're clearing processing state for another pass. |
boolean |
isFinished()
Return true if this bucket is finished processing. |
boolean |
isOrdered()
Test to see if the bucket is ordered. |
void |
remove(ResourceOp op)
Remove an op from this bucket. |
void |
setDependencies()
Set ResourceInfo dependencies according to the order of the ops in this bucket. |
java.lang.String |
toIdentityString()
|
java.lang.String |
toVerboseString()
|
java.lang.String |
toVerboseString(java.lang.String indent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
Constructor Detail |
public OpBucket(boolean ordered)
Method Detail |
public void add(ResourceOp op)
public void remove(ResourceOp op)
public int getOpCount()
public java.util.List getOps()
public boolean isOrdered()
public void clear()
public void init()
public ResourceOp find(java.lang.String id)
public void clearDependencies()
public void setDependencies() throws WavesetException
WavesetException
public void assimilate(OpBucket other)
public ResourceOp getNextOp()
This was written prior to the introduction of the _dependentOp pointer in the ResourceOp. We could now combine this with getNextDependentOp, but the original implementation here is faster.
public int checkFinished()
public boolean isFinished()
public ResourceOp getNextDependentOp()
We expect to be called only from getNextOp or another synchronized method.
If this list is long, there are certainly more optimal ways to search it. Might want to maintain a separate list of unprocessed ops?
public void failDependentOps(ResourceOp failedOp)
public void dumpFile(java.lang.String file)
public java.lang.String toIdentityString()
public java.lang.String toVerboseString()
public java.lang.String toVerboseString(java.lang.String indent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |