|
||||||||
| 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.SnarfRecord
Manage retrieval, refitting, and rewriting of existing flocks. Assign indices for new
flocks.
SnarfRecords can go away after their contents have been flushed. We might keep it around
if we expect to be assigning new flocks to the snarf again, just to keep myOccupied. The
snarfRecord will be recreated when another object is read in.
| Field Summary | |
protected PrimPtrTable |
myChangedFlocks
|
protected int |
myDestroyCount
|
protected IntegerRegion |
myOccupied
|
protected SnarfPacker |
myPacker
|
protected SnarfID |
mySnarfID
|
protected int |
mySpaceLeft
|
| 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 | |
SnarfRecord(SnarfID snarfID,
SnarfPacker packer,
int spaceLeft)
|
|
| Method Summary | |
int |
actualHashForEqual()
|
int |
allocate(int size,
Abraham shep)
Shep is being newly added to this snarf. |
IntegerVar |
allocateIndex()
Return the first unoccupied index in the snarf. |
void |
changedFlock(int index,
Abraham shep)
Remember that the flock at index must be written to the snarf on the next update. |
void |
destruct()
Destroy all objects imaged from this snarf. |
void |
dismantleFlock(FlockInfo info)
Remove the flock from the disk. |
FlockLocation |
fetchForward(int index)
If the location specified by info has been forwarded, return a flockInfo describing its new location. |
void |
flushChanges()
Rewrite all flocks that have changed in this snarf. |
MuSet |
forgottenFlocks()
Return the set of indices to locations that are forgotten. |
SnarfHandler |
getWriteHandler()
Get the handler for my snarf so that I can send or receive data from it. |
boolean |
isEqual(java.lang.Object other)
|
boolean |
isForgotten(int index)
Return true if the flock at that location is forgotten. |
boolean |
isPurgeable()
Return true if everything in this snarfRecord is purged. If so, then this snarfRecord can be thrown away. |
static Heaper |
make(SnarfID snarfID,
SnarfPacker packer,
int spaceLeft)
|
void |
makeReal(int index,
Abraham stub)
We know that the object wasn't imaged. |
Abraham |
originateFlock(IntegerVar index)
This will get a flock that we know the location of without a stub. |
void |
printOn(java.io.PrintWriter oo)
|
void |
readOccupied()
Create an array with the sizes of every flock in the snarf. |
void |
refitFlocks()
Recompute size information for all changed shepherds and see if they still fit. Any that don't get handed to the SnarfPacker to treat as new flocks. |
void |
setSpaceLeft(int spaceLeft)
|
int |
spaceLeft()
Return the amount of space currently left in the snarf. |
IntegerVar |
wipeBelowHighest(int highest,
SnarfHandler handler)
|
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, displayString, error, hack, halt, inspect, 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 SnarfID mySnarfID
protected SnarfPacker myPacker
protected int mySpaceLeft
protected IntegerRegion myOccupied
protected PrimPtrTable myChangedFlocks
protected int myDestroyCount
| Constructor Detail |
public SnarfRecord(SnarfID snarfID,
SnarfPacker packer,
int spaceLeft)
| Method Detail |
public int allocate(int size,
Abraham shep)
public void changedFlock(int index,
Abraham shep)
public void dismantleFlock(FlockInfo info)
public void flushChanges()
public void refitFlocks()
public int spaceLeft()
public void destruct()
destruct in class Heaperpublic IntegerVar allocateIndex()
public SnarfHandler getWriteHandler()
public void readOccupied()
public void setSpaceLeft(int spaceLeft)
public IntegerVar wipeBelowHighest(int highest,
SnarfHandler handler)
public void printOn(java.io.PrintWriter oo)
printOn in class Heaperpublic FlockLocation fetchForward(int index)
public MuSet forgottenFlocks()
public boolean isForgotten(int index)
public boolean isPurgeable()
public void makeReal(int index,
Abraham stub)
public Abraham originateFlock(IntegerVar index)
public int actualHashForEqual()
actualHashForEqual in class Heaperpublic boolean isEqual(java.lang.Object other)
public static Heaper make(SnarfID snarfID,
SnarfPacker packer,
int spaceLeft)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||