Index - All Packages - All Categories - All Classes

Class DiskManager

This is the public interface for managing objects that should go to disk.
This is also the anchor for the so-called Backend emulsion, but I'll call it
the DiskManager emulsion for simplicity.

Package: Udanax-Gold
All Superclasses: Object Heaper
Immediate Subclasses: CBlockTrackingPacker FakePacker SnarfPacker TestPacker
Protocols: Object
Categories: Xanadu-Snarf

Class Methods

bombConsistentBlock: CHARGE


cleanupGarbage


consistent: aBlock

Execute the block inside a pseudo-transaction.

consistent: dirty with: aBlock

Execute the block inside a pseudo-transaction.

consistent: dirty with: aBlock with: context


emulsion


exitTimeNonInherited


initializeDisk: fname

This builds the disk managing structure.

insistent: aBlock

Execute the block inside a pseudo-transaction.

insistent: dirty with: aBlock

Execute the block inside a pseudo-transaction.

insistent: dirty with: aBlock with: context


linkTimeNonInherited



Overridden by: SnarfPacker class

make: fname



Overridden by: CBlockTrackingPacker class SnarfPacker class

staticTimeNonInherited



Instance Methods

actualHashForEqual


beginConsistent: dirty

This is called before entering consistent block. 'dirty' is the block's declaration of the maximum number of shepherds which it can dirty. If this is a top level consistent block, the virtual image in memory is now in a consistent state. It may be written to the disk if necessary.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

consistent: aBlock

Execute the block inside a pseudo-transaction.

consistent: dirty with: aBlock

Execute the block inside a pseudo-transaction.

Overridden by: SnarfPacker

consistentBlockAt: fileName with: lineNo

This is called after beginConsistent, but before entering a consistent block, for debugging purposes. Default is to do nothing

Overridden by: CBlockTrackingPacker

create



Overrides: Heaper
Overridden by: FakePacker

destroyFlock: info

Queue destroy of the given flock. The destroy will probably happen later.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

destruct



Overrides: Heaper
Overridden by: CBlockTrackingPacker SnarfPacker

diskUpdate: info

The flock described by info is Dirty! On the next commit, rewrite it to the disk.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

dismantleFlock: info

The flock designated by info has completed all dismantling actions; throw it off the disk.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

dropFlock: token

The flock identified by token is being removed from memory. For now, this is an
error if the flock has been updated. If the flock has been forgotten, then it will
be dismantled when next it comes in from disk.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

endConsistent: dirty

This is called after exiting a consistent block.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

fetchCanonical: hash with: snarfID with: index

If something is already imaged at that location, then return it. If there is already
an existing stub with the same hash at a different location, follow them both till we
know that they are actually different objects.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

flockInfoTable


flockInfoTable: table


flockTable


flockTable: table


fluidSpace


fluidSpace: aFluidSpace


forgetFlock: info

Remember that there are no more persistent pointers to the shepherd
described by info. If it gets garbage collected, remember to dismantle it
when it comes back in from the disk.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

getInitialFlock

Return the starting object for the entire backend. This will be the 0th
flock in the first snarf following the snarfInfo tables. This will eventually
always be a shepherd that describes the protocol of the rest of the disk.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

insideCommit



Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

isFake



Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

makeConsistent

The virtual image in memory is now in a consistent state. It may be written to
the disk if necessary.

Overridden by: TestPacker

makeConsistentBegin: dirty

The virtual image in memory is now in a consistent state. It may be written to the disk if necessary. This is called before entering a top level consistent block. 'dirty' is the block's declaration of the maximum number of shepherds which it can dirty.

makeConsistentEnd

This is called after exiting a top level consistent block.

makeReal: info

Retrieve from the disk the flock at index within the specified snarf. Since
stubs are canonical, and this only gets called by stubs, the existing stub will
*become* the shepherd for the flock.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

nextHashForEqual

Shepherds use a sequence number for their hash. The most trivial (reasonable)
implementation just uses a BatchCounter. This will not be persistent till we get
Turtles.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

purge

Flush everything out to disk and remove all purgeable imaged objects from memory.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

purgeClean: noneLocked

purge all shepherds that are currently clean, not locked, not dirty, and
purgeable. Purging just turns them into stubs, freeing the rest of their flocks.
Garbage collection can clean up the flocks and any stubs no longer pointed to
by something in memory.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

registerStub: shep with: snarfID with: index

Called to register a newly created stub (by the diskSpecialist) in the internal
tables. The diskSpecialist in particular calls this when it couldn't find an
already existing stub (with fetchCacnonical) representing the flock at the
particular location.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

rememberFlock: info

There are now persistent pointers to the shepherd described by info. See forgetFlock.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

setHashCounter: aCounter



Overridden by: SnarfPacker

storeAlmostNewShepherd: shep

Shep has been created, but is not consistent yet. storeNewFlock must be called on it before the next makeConsistent.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

storeInitialFlock: turtle with: protocol with: cookbook

A turtle just got created! Remember it as the initial flock.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker

storeNewFlock: shep

Shep just got created! On some later commit, assign it to a snarf
and write it to the disk.

Overridden by: CBlockTrackingPacker FakePacker SnarfPacker TestPacker


Index - All Packages - All Categories - All Classes