|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.gold.java.AboraHeaper
|
+--org.abora.gold.xpp.basic.Heaper
|
+--org.abora.gold.snarf.Abraham
|
+--org.abora.gold.be.canopy.CanopyCrum
CanopyCrums form binary trees that acrete in a balanced fashion. No rebalancing ever
happens. Things are simply added to the tree up to the point thta the tree is balanced,
then the height of the tree gets extended at the root.
Essentially, when the join of two trees is asked for, if the two trees aren''t already
parts of a larger tree, the algorithm attempts to find a place in one tree into which the
other tree could completely fit without violating the depth constraint on the tree. It
then returns the nearest root that contains both trees. If it can''t put one tree into
the other, then it makes a new node that joins the two trees (probably with room to add
other stuff deeper down).
myRefCount is only the count of Loafs or HCrums that point at the CanopyCrum. It doesn''t
include other CanopyCrums.
12/2/92 Ravi
PropJoints have been suspended, and their function has been replaced by flag words in the
CanopyCrum. Any interesting Club or endorsement gets a bit, and there is a bit for "any
other Club" and "any other endorsement". Any criteria not given a bit of their own require
an exhaustive search. These flags are widded by ORing up the canopy. When we start using
more sophisticated hashing strategies, we will probably need to reanimate PropJoints.
| Field Summary | |
protected CanopyCrum |
child1
|
protected CanopyCrum |
child2
|
protected static PtrArray |
FlagEndorsements
|
protected IntegerVar |
maxH
|
protected IntegerVar |
minH
|
protected int |
myFlags
|
protected int |
myOwnFlags
|
protected IntegerVar |
myRefCount
|
protected static IDRegion |
OtherClubs
|
protected static CrossRegion |
OtherEndorsements
|
protected CanopyCrum |
parent
|
protected static Heaper2UInt32Cache |
TheEFlagsCache
|
protected static Heaper2UInt32Cache |
ThePFlagsCache
|
| Fields inherited from class org.abora.gold.snarf.Abraham |
DismantleStatistics, myHash, myInfo, myToken, TheTokenSource |
| Fields inherited from class org.abora.gold.xpp.basic.Heaper |
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes |
| Fields inherited from class org.abora.gold.java.AboraHeaper |
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag |
| Constructor Summary | |
CanopyCrum(int flags)
Make a canopyCrum for a root: it has no children. |
|
CanopyCrum(int flags,
CanopyCrum first,
CanopyCrum second)
prop must be empty |
|
CanopyCrum(Rcvr receiver)
|
|
| Method Summary | |
void |
addPointer(Heaper ignored)
Keep a refcount of diskful pointers to myself for disk space management. |
CanopyCrum |
another()
Return another instance of the same class for testing purposes. |
CanopyCache |
canopyCache()
|
boolean |
changeCanopy()
Figure out new props, etc. |
boolean |
changeCanopy(PropChange change)
Figure out new height, props, etc. |
boolean |
changeHeight()
Figure out new height. |
Array |
childArray()
|
Array |
children()
|
CanopyCrum |
computeJoin(CanopyCrum otherBCrum)
Find a canopyCrum that is an anscestor to both the receiver and otherBCrum. |
int |
contentsHash()
This is only used by the TestPacker, so it includes all persistent state whether or not it is semantically interesting--myRefCount is not semantically interesting. |
void |
dismantle()
Disconnect me from the universe and throw me off the disk. For GC safety, we keep a strongptr to ourself -- is this still necessary? |
java.lang.String |
displayString()
|
static int |
endorsementFlagLimit()
Max number of special endorsement flags |
static int |
endorsementsFlags(CrossRegion endorsements)
Flag bits corresponding to endorsements |
Pair |
expand()
split into two if possible, return the two leaves |
CanopyCrum |
fetchChild1()
|
CanopyCrum |
fetchChild2()
|
CanopyCrum |
fetchParent()
|
static int |
firstEndorsementsFlag()
Rightmost flag for interesting endorsements |
int |
flags()
|
PropChange |
fullChange()
|
IntegerVar |
heightDiff()
|
void |
includeCanopy(CanopyCrum otherCanopy)
Install otherCanopy at or below the receiver. |
static void |
initTimeNonInherited()
|
void |
inspect()
|
void |
inspectSubCanopy(java.lang.Object start)
|
boolean |
isLE(CanopyCrum other)
Return true if other is equal to the receiver or an anscestor (through the parent links). Use caches for efficiency. |
boolean |
isLeaf()
|
PropJoint |
joint()
Return the abstracted information necessary to determine whether anything leafward may pass the filtering criteria. |
static void |
linkTimeNonInherited()
|
CanopyCrum |
makeJoin(CanopyCrum otherCanopy)
Install otherCanopy as a subtree in the canopy containing the receiver. |
CanopyCrum |
makeNew()
|
CanopyCrum |
makeNewParent(CanopyCrum first,
CanopyCrum second)
Make a new crum that contains both first and second. This method just makes a new parent whose properties are empty. |
IntegerVar |
maxHeight()
|
IntegerVar |
minHeight()
|
static int |
otherClubsFlag()
The flag for any other Clubs |
static int |
otherEndorsementsFlag()
Flag for all uninteresting endorsements |
int |
ownFlags()
|
static int |
permissionsFlags(IDRegion permissions)
Flag bits corresponding to permissions |
AgendaItem |
propChanger(PropChange change,
Prop prop)
Return an AgendaItem to propagate properties. NOTE: The AgendaItem returned is not yet scheduled. |
static int |
publicClubFlag()
The flag for the Universal Public Club |
IntegerVar |
refCount()
|
void |
removePointer(Heaper ignored)
Keep a refcount of diskful pointers to myself for disk space management. |
void |
sendSelfTo(Xmtr xmtr)
do nothing |
void |
setOwnFlags(int newFlags)
|
void |
setParent(CanopyCrum p)
|
static void |
useEndorsementFlags(PtrArray endorsements)
Use a special flag to look for any of the these endorsements |
CanopyCrum |
verify1()
BertCrum create verify1 |
CanopyCrum |
verify2()
BertCrum create verify2. |
CanopyCrum |
verifyHeight(IntegerVar height)
Create a tree with maxHeight = height and minHeight = 2. |
| Methods inherited from class org.abora.gold.snarf.Abraham |
actualHashForEqual, becomeStub, cleanupGarbage, destroy, destruct, diskUpdate, dismantleStatistics, fetchInfo, fetchShepherd, flockInfo, forget, getInfo, getShepherdStubCategory, isConstructed, isDestructed, isEqual, isKindOf, isPurgeable, isShepherd, isStub, isUnlocked, newShepherd, remember, restartAbraham, restartAbraham, returnToken, staticTimeNonInherited, token |
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, error, hack, halt, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected CanopyCrum child1
protected CanopyCrum child2
protected CanopyCrum parent
protected IntegerVar minH
protected IntegerVar maxH
protected int myOwnFlags
protected int myFlags
protected IntegerVar myRefCount
protected static PtrArray FlagEndorsements
protected static IDRegion OtherClubs
protected static CrossRegion OtherEndorsements
protected static Heaper2UInt32Cache TheEFlagsCache
protected static Heaper2UInt32Cache ThePFlagsCache
| Constructor Detail |
public CanopyCrum(int flags)
public CanopyCrum(int flags,
CanopyCrum first,
CanopyCrum second)
public CanopyCrum(Rcvr receiver)
| Method Detail |
public CanopyCrum computeJoin(CanopyCrum otherBCrum)
public Pair expand()
public void includeCanopy(CanopyCrum otherCanopy)
public boolean isLE(CanopyCrum other)
public void addPointer(Heaper ignored)
public CanopyCrum fetchParent()
public int flags()
public IntegerVar heightDiff()
public boolean isLeaf()
public IntegerVar maxHeight()
public IntegerVar minHeight()
public void removePointer(Heaper ignored)
public void setParent(CanopyCrum p)
public CanopyCache canopyCache()
public void dismantle()
Abraham
dismantle in class Abrahampublic CanopyCrum fetchChild1()
public CanopyCrum fetchChild2()
public CanopyCrum makeNew()
public int ownFlags()
public void setOwnFlags(int newFlags)
public CanopyCrum another()
public IntegerVar refCount()
public CanopyCrum verify1()
public CanopyCrum verify2()
public CanopyCrum verifyHeight(IntegerVar height)
public Array childArray()
public Array children()
public java.lang.String displayString()
displayString in class AboraHeaperpublic void inspect()
inspect in class AboraHeaperpublic void inspectSubCanopy(java.lang.Object start)
public AgendaItem propChanger(PropChange change,
Prop prop)
public int contentsHash()
contentsHash in class Abrahampublic boolean changeCanopy()
public boolean changeHeight()
public CanopyCrum makeNewParent(CanopyCrum first,
CanopyCrum second)
public CanopyCrum makeJoin(CanopyCrum otherCanopy)
public boolean changeCanopy(PropChange change)
public PropChange fullChange()
public PropJoint joint()
public void sendSelfTo(Xmtr xmtr)
Heaper
sendSelfTo in class Abrahampublic static void initTimeNonInherited()
public static void linkTimeNonInherited()
public static int endorsementsFlags(CrossRegion endorsements)
public static int permissionsFlags(IDRegion permissions)
public static int endorsementFlagLimit()
public static int firstEndorsementsFlag()
public static int otherClubsFlag()
public static int otherEndorsementsFlag()
public static int publicClubFlag()
public static void useEndorsementFlags(PtrArray endorsements)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||