Index - All Packages - All Categories - All Classes

Class 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.

Package: Udanax-Gold
All Superclasses: Object Heaper
Protocols: Object
Categories: Xanadu-Snarf

Class Methods

make: snarfID with: packer with: spaceLeft



Instance Methods

actualHashForEqual


allocate: size with: shep

Shep is being newly added to this snarf. Allocate enough space for it and return the newly assigned index for it.

allocateIndex

Return the first unoccupied index in the snarf. Compute the lowest
element >= 0 that is not already in the occupied region by subtracting
the occupied region from the region >= 0.

changedFlock: index with: shep

Remember that the flock at index must be written to the snarf on the next update.

create: snarfID with: packer with: spaceLeft


destruct

Destroy all objects imaged from this snarf.

Overrides: Heaper

dismantleFlock: info

Remove the flock from the disk. Replace it with a Pumpkin so that the
routine that flushes to disk knows to remove whatever's there already.

fetchForward: index

If the location specified by info has been forwarded, return a flockInfo
describing its new location.

flushChanges

Rewrite all flocks that have changed in this snarf.

forgottenFlocks

Return the set of indices to locations that are forgotten.

getWriteHandler

Get the handler for my snarf so that I can send or receive data from it.

isEqual: other


isForgotten: index

Return true if the flock at that location is forgotten. Higher level routines
should make sure this doesn't get done very often because it requires bringing
in the snarf if it's not already there.

isPurgeable

Return true if everything in this snarfRecord is purged.
If so, then this snarfRecord can be thrown away.

makeReal: index with: stub

We know that the object wasn't imaged. Read the real shepherd into
the memory occupied by stub. If the location is a forwarder, then
register a new flockInfo with the stub and just return.

originateFlock: index

This will get a flock that we know the location of
without a stub. The flock must not already be imaged,
and it must not be forwarded.

printOn: oo



Overrides: Object

readOccupied

Create an array with the sizes of every flock in the snarf.

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. The
old space changed and dismantled flocks has been returned to the pool.
Reallocate space for the changed flocks out of the pool. Any that don't fit
are handed back to myPacker to go in other snarfs.

setSpaceLeft: spaceLeft


spaceLeft

Return the amount of space currently left in the snarf.

wipeBelowHighest: highest with: handler




Index - All Packages - All Categories - All Classes