Index - All Packages - All Categories - All Classes

Class TestPacker

Does not actually go to disk, but just tests that the protocol is being followed correctly. Some of these tests may make it into the real SnarfPacker, but some of them will remain debugging tools. Most operations only do enough real stuff to be able to check that they work.


The TestPacker holds onto an IntegerTable of UInt8Arrays that contain the disk representations of all the flocks. It also holds

myDisk contains a UInt8Array for every flock that made it to disk. They are assigned sequential numbers.
myNewFlocks contains the flockInfos for new flocks, and thus contains the new flocks wimpily.
myAlmostNewFlocks contains flocks that are under construction but have not yet finished.
myDestroyedFlocks contains flocks that will be destroyed upon exiting the current consistent block.
myChangedFlocks points strongly at flocks that must be rewritten to disk.

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

Class Methods

bombEndCommit: CHARGE


make: blast with: persistInterval



Instance Methods

assignSnarf: shep


beginConsistent: dirty



Overrides: DiskManager

checkNewFlockIndices


committing: flag


computeHash: flock

Compute a hash on the contents

computeSize: flock

Send the snarf over a transmitter into a stream that just counts the bytes put into it.

countDown

Decrement the countdown and return its new value

create: blast with: persistInterval


destroyFlock: info

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

Overrides: DiskManager

diskUpdate: info



Overrides: DiskManager

dismantleFlock: info

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

Overrides: DiskManager

dropFlock: token



Overrides: DiskManager

endConsistent: dirty



Overrides: DiskManager

fetchCanonical: hash with: snarfID with: index



Overrides: DiskManager

flushChanges

Rewrite all flocks that have changed in this snarf.

forgetFlock: info



Overrides: DiskManager

getInitialFlock



Overrides: DiskManager

insideCommit



Overrides: DiskManager

isFake



Overrides: DiskManager

makeConsistent



Overrides: DiskManager

makePersistent


makeRcvr: readStream


makeReal: info



Overrides: DiskManager

makeXmtr: writeStream


mustBeInsideTransaction


mustKnowShepherd: info

Check that I know about this shepherd

mustNotBeCommitting


nextHashForEqual



Overrides: DiskManager

purge



Overrides: DiskManager

purgeClean


purgeClean: noneLocked



Overrides: DiskManager

readStream: info

Get a read stream on the disk contents of the info

recordUpdate: info

The flock represented by info has changed. Record it in the
bookkeeping data-structures. This must be called by all things
that affect whether the flock gets rewritten to disk.

refitFlocks

do nothing for now

registerStub: shep with: snarfID with: index



Overrides: DiskManager

rememberFlock: info



Overrides: DiskManager

resetCountDown


storeAlmostNewShepherd: shep



Overrides: DiskManager

storeInitialFlock: turtle with: protocol with: cookbook



Overrides: DiskManager

storeNewFlock: shep

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

Overrides: DiskManager

writeStream: info

Get a write stream on the disk contents of the info


Index - All Packages - All Categories - All Classes