org.abora.gold.snarf
Class FakePacker

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

public class FakePacker
extends DiskManager

Most of the disk operations are just no-ops.


Field Summary
protected  byte myCount
           
protected  Turtle myTurtle
           
 
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
FakePacker()
           
 
Method Summary
 void beginConsistent(IntegerVar dirty)
          This is called before entering consistent block.
 void destroyAbandoned()
           
 void destroyFlock(FlockInfo info)
          Queue destroy of the given flock.
 void diskUpdate(FlockInfo info)
          The flock identified by token is Dirty!! On some later commit, write it to the disk.
 void dismantleFlock(FlockInfo info)
          Tehre are no local data-structures.
 void dropFlock(int token)
          No prob.
 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)
          Yeah.
 Turtle getInitialFlock()
          Return the starting object for the entire backend.
 boolean insideCommit()
           
 boolean isFake()
           
static Heaper make()
           
 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)
          No shepherds are clean, so no-op.
 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 represented by token.
 void storeAlmostNewShepherd(Abraham shep)
          Do nothing
 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.
 void storeTurtle(Turtle turtle)
           
 
Methods inherited from class org.abora.gold.snarf.DiskManager
actualHashForEqual, bomb, cleanupGarbage, consistent, consistent, consistent, consistentBlockAt, destruct, 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

myTurtle

protected Turtle myTurtle

myCount

protected byte myCount
Constructor Detail

FakePacker

public FakePacker()
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

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()
Flush everything out to disk and remove all purgeable imaged
objects from memory. This doesn't clear the ShepherdMap table.
This will have to be a weak table, and then the destruction of a
shepherd or shepherdStub should remove it from myShepherdMap.

Overrides:
purge in class DiskManager

purgeClean

public void purgeClean(boolean noneLocked)
No shepherds are clean, so no-op.

Overrides:
purgeClean in class DiskManager

destroyFlock

public void destroyFlock(FlockInfo info)
Queue destroy of the given flock. dismantle it immediately in the FakePacker.

Overrides:
destroyFlock in class DiskManager

diskUpdate

public void diskUpdate(FlockInfo info)
The flock identified by token is Dirty!! On some later commit, write it to the disk.

Overrides:
diskUpdate in class DiskManager

dismantleFlock

public void dismantleFlock(FlockInfo info)
Tehre are no local data-structures.

Overrides:
dismantleFlock in class DiskManager

dropFlock

public void dropFlock(int token)
No prob.

Overrides:
dropFlock in class DiskManager

forgetFlock

public void forgetFlock(FlockInfo info)
Yeah. Right.

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()
Shepherds use a sequence number for their hash. Return the next one
and increment. This should actually spread the hashes.

Overrides:
nextHashForEqual in class DiskManager

rememberFlock

public void rememberFlock(FlockInfo info)
There are now persistent pointers to the shepherd represented by token.

Overrides:
rememberFlock in class DiskManager

storeAlmostNewShepherd

public void storeAlmostNewShepherd(Abraham shep)
Do nothing

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)
Shep just got created!! On some later commit, assign it to a snarf
and write it to the disk.

Overrides:
storeNewFlock in class DiskManager

storeTurtle

public void storeTurtle(Turtle turtle)

fetchCanonical

public Abraham fetchCanonical(int hash,
                              SnarfID snarfID,
                              int 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 till we
know that they are actually different objects.

Overrides:
fetchCanonical in class DiskManager

makeReal

public void makeReal(FlockInfo 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.

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

isFake

public boolean isFake()
Overrides:
isFake in class DiskManager

destroyAbandoned

public void destroyAbandoned()

make

public static Heaper make()


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