org.abora.gold.snarf
Class CBlockTrackingPacker

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.snarf.DiskManager
                    |
                    +--org.abora.gold.snarf.CBlockTrackingPacker

public class CBlockTrackingPacker
extends DiskManager


Field Summary
protected  DiskManager myPacker
           
protected  CBlockTracker myTracker
           
 
Fields inherited from class org.abora.gold.snarf.DiskManager
myFlockInfoTable, myFlockTable, myFluidSpace, SecretEmulsion
 
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
CBlockTrackingPacker(DiskManager subPacker)
           
 
Method Summary
 void beginConsistent(IntegerVar dirty)
          This is called before entering consistent block.
 boolean checkTracker()
           
 void commitState(boolean flag)
          Used by ResetCommit bomb
 void consistentBlockAt(java.lang.String fileName, int lineNo)
          This is called after beginConsistent, but before entering a consistent block, for
debugging purposes.
 void consistentCount()
           
 void destroyFlock(FlockInfo info)
          Queue destroy of the given flock.
 void destruct()
          Classes should implement this message rather than a destructor.
 void diskUpdate(FlockInfo info)
          The flock described by info is Dirty!! On the next commit, rewrite it to the disk.
 void dismantleFlock(FlockInfo info)
          The flock designated by info has completed all dismantling actions; throw it off the disk.
 void dropFlock(int token)
          The flock identified by token is being removed from memory.
 void endConsistent(IntegerVar dirty)
          This is called after exiting a consistent block.
 Abraham fetchCanonical(int hash, SnarfID snarfID, int index)
          If something is already imaged at that location, then return it.
 void forgetFlock(FlockInfo info)
          Remember that there are no more persistent pointers to the shepherd
described by info.
 Turtle getInitialFlock()
          Return the starting object for the entire backend.
 boolean insideCommit()
           
 boolean isFake()
           
static Heaper make(DiskManager subPacker)
           
 void makeReal(FlockInfo info)
          Retrieve from the disk the flock at index within the specified snarf.
 int nextHashForEqual()
          Shepherds use a sequence number for their hash.
 void purge()
          Flush everything out to disk and remove all purgeable imaged objects from memory.
 void purgeClean(boolean noneLocked)
          purge all shepherds that are currently clean, not locked, not dirty, and
purgeable.
 void registerStub(Abraham shep, SnarfID snarfID, int index)
          Called to register a newly created stub (by the diskSpecialist) in the internal
tables.
 void rememberFlock(FlockInfo info)
          There are now persistent pointers to the shepherd described by info.
 void storeAlmostNewShepherd(Abraham shep)
          Shep has been created, but is not consistent yet.
 void storeInitialFlock(Abraham turtle, XcvrMaker protocol, Cookbook cookbook)
          A turtle just got created!! Remember it as the initial flock.
 void storeNewFlock(Abraham shep)
          Shep just got created!! On some later commit, assign it to a snarf
and write it to the disk.
 
Methods inherited from class org.abora.gold.snarf.DiskManager
actualHashForEqual, bomb, cleanupGarbage, consistent, consistent, consistent, emulsion, exitTimeNonInherited, flockInfoTable, flockInfoTable, flockTable, flockTable, fluidSpace, fluidSpace, initializeDisk, insistent, insistent, insistent, linkTimeNonInherited, make, makeConsistent, makeConsistentBegin, makeConsistentEnd, setHashCounter, staticTimeNonInherited
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, printOn, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, sendSelfTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
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

myPacker

protected DiskManager myPacker

myTracker

protected CBlockTracker myTracker
Constructor Detail

CBlockTrackingPacker

public CBlockTrackingPacker(DiskManager subPacker)
Method Detail

beginConsistent

public void beginConsistent(IntegerVar dirty)
Description copied from class: DiskManager
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.

Overrides:
beginConsistent in class DiskManager

consistentBlockAt

public void consistentBlockAt(java.lang.String fileName,
                              int lineNo)
Description copied from class: DiskManager
This is called after beginConsistent, but before entering a consistent block, for
debugging purposes. Default is to do nothing

Overrides:
consistentBlockAt in class DiskManager

endConsistent

public void endConsistent(IntegerVar dirty)
Description copied from class: DiskManager
This is called after exiting a consistent block.

Overrides:
endConsistent in class DiskManager

insideCommit

public boolean insideCommit()
Overrides:
insideCommit in class DiskManager

purge

public void purge()
Description copied from class: DiskManager
Flush everything out to disk and remove all purgeable imaged objects from memory.

Overrides:
purge in class DiskManager

purgeClean

public void purgeClean(boolean noneLocked)
Description copied from class: DiskManager
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.

Overrides:
purgeClean in class DiskManager

destroyFlock

public void destroyFlock(FlockInfo info)
Queue destroy of the given flock. The destroy will probably happen later.

Overrides:
destroyFlock in class DiskManager

diskUpdate

public void diskUpdate(FlockInfo info)
Description copied from class: DiskManager
The flock described by info is Dirty!! On the next commit, rewrite it to the disk.

Overrides:
diskUpdate in class DiskManager

dismantleFlock

public void dismantleFlock(FlockInfo info)
The flock designated by info has completed all dismantling actions; throw it off the disk.

Overrides:
dismantleFlock in class DiskManager

dropFlock

public void dropFlock(int token)
Description copied from class: DiskManager
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.

Overrides:
dropFlock in class DiskManager

forgetFlock

public void forgetFlock(FlockInfo info)
Description copied from class: DiskManager
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.

Overrides:
forgetFlock in class DiskManager

getInitialFlock

public Turtle getInitialFlock()
Description copied from class: DiskManager
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.

Overrides:
getInitialFlock in class DiskManager

nextHashForEqual

public int nextHashForEqual()
Description copied from class: DiskManager
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.

Overrides:
nextHashForEqual in class DiskManager

rememberFlock

public void rememberFlock(FlockInfo info)
Description copied from class: DiskManager
There are now persistent pointers to the shepherd described by info. See forgetFlock.

Overrides:
rememberFlock in class DiskManager

storeAlmostNewShepherd

public void storeAlmostNewShepherd(Abraham shep)
Description copied from class: DiskManager
Shep has been created, but is not consistent yet. storeNewFlock must be called on it
before the next makeConsistent.

Overrides:
storeAlmostNewShepherd in class DiskManager

storeInitialFlock

public void storeInitialFlock(Abraham turtle,
                              XcvrMaker protocol,
                              Cookbook cookbook)
Description copied from class: DiskManager
A turtle just got created!! Remember it as the initial flock.

Overrides:
storeInitialFlock in class DiskManager

storeNewFlock

public void storeNewFlock(Abraham shep)
Description copied from class: DiskManager
Shep just got created!! On some later commit, assign it to a snarf
and write it to the disk.

Overrides:
storeNewFlock in class DiskManager

fetchCanonical

public Abraham fetchCanonical(int hash,
                              SnarfID snarfID,
                              int index)
Description copied from class: DiskManager
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.

Overrides:
fetchCanonical in class DiskManager

makeReal

public void makeReal(FlockInfo info)
Description copied from class: DiskManager
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.

Overrides:
makeReal in class DiskManager

registerStub

public void registerStub(Abraham shep,
                         SnarfID snarfID,
                         int index)
Description copied from class: DiskManager
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.

Overrides:
registerStub in class DiskManager

consistentCount

public void consistentCount()

destruct

public void destruct()
Description copied from class: Heaper
Classes should implement this message rather than a destructor. We use this so
the destruction behavior implemented in abstract superclasses can access the
vtable of the concrete run-time type in C++. Using a message makes C++
parallel the Smalltalk semantics for delete. Destroy will actually call the destructor.

Overrides:
destruct in class DiskManager

isFake

public boolean isFake()
Overrides:
isFake in class DiskManager

checkTracker

public boolean checkTracker()

commitState

public void commitState(boolean flag)
Used by ResetCommit bomb


make

public static Heaper make(DiskManager subPacker)


Translation - Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.