org.abora.gold.snarf
Class Abraham

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.snarf.Abraham
Direct Known Subclasses:
AgendaItem, BeGrandMap, BeRangeElement, BranchDescription, CanopyCrum, Counter, DagWood, DoublingFlock, Ent, GrandDataPage, GrandEntry, GrandNode, GrandOverflow, MultiCounter, OPart, PairFlock, Pumpkin, RecorderFossil, SharedData, ShepherdLocked, TrailBlazer, Turtle

public class Abraham
extends Heaper


Field Summary
protected static IdentityDictionary DismantleStatistics
           
protected  int myHash
           
protected  FlockInfo myInfo
           
protected  int myToken
           
protected static TokenSource TheTokenSource
           
 
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
Abraham()
          New Shepherds must be stored to disk.
Abraham(int hash)
          This is for shepherds that are becoming from another shepherd.
Abraham(int hash, FlockInfo info)
          This is for ShepherdStubs that use the hash and forgetFlag from the object for which they
are stubbing.
Abraham(Rcvr receiver)
           
Abraham(ShepFlag ignored, int hash, FlockInfo info)
          This is the root of the automatically generated constructors for creating Stubs.
 
Method Summary
 int actualHashForEqual()
           
 void becomeStub()
          Replace the shepherd in memory with a type compatible stub
instance that shares the same hash and flockInfo.
static void cleanupGarbage()
          Heaper cleanupGarbage
 int contentsHash()
          A hash of the contents of this flock
 void destroy()
          Tell the packer I want to go away.
 void destruct()
          Called when an object is leaving RAM.
 void diskUpdate()
          The receiver has changed and so must eventually be rewritten to disk.
 void dismantle()
          Disconnect me from the universe and throw me off the disk.
For GC safety, we keep a strongptr to ourself -- is this still necessary?
static void dismantleStatistics()
           
 FlockInfo fetchInfo()
          Return the object that describes the state of this flock wrt disk.
static Abraham fetchShepherd(int token)
           
 void flockInfo(FlockInfo info)
          Set the object that knows where this flock is on disk.
 void forget()
          Record on disk that there are no more persistent pointers to the receiver.
 FlockInfo getInfo()
          Return the object that describes the state of this flock wrt disk.
 Category getShepherdStubCategory()
          Return the category of stubs used for the receiver.
static void initTimeNonInherited()
           
static boolean isConstructed(Heaper obj)
           
static boolean isDestructed(Heaper obj)
           
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
 boolean isKindOf(Category cat)
          Optimized for Abraham because xcvrs use it so much.
 boolean isPurgeable()
          Return false only if the object cannot be flushed to disk.
 boolean isShepherd()
          This should be replaced with an isKindOf: that first checks to see
if you're asking about Abraham, and then otherwise possible faults.
 boolean isStub()
          Distinguish between stubs and shepherds.
 boolean isUnlocked()
          All manually generated subclasses are locked.
static void linkTimeNonInherited()
           
 void newShepherd()
          The receiver has just been created.
 void remember()
          Record that there are now persistent pointers to the receiver.
 void restartAbraham()
           
 void restartAbraham(Rcvr trans)
           
static void returnToken(int token)
           
 void sendSelfTo(Xmtr xmtr)
          do nothing
static void staticTimeNonInherited()
           
 int token()
          Return the object that describes the state of this flock wrt disk.
 
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, 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, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, 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, 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

myHash

protected int myHash

myToken

protected int myToken

myInfo

protected FlockInfo myInfo

DismantleStatistics

protected static IdentityDictionary DismantleStatistics

TheTokenSource

protected static TokenSource TheTokenSource
Constructor Detail

Abraham

public Abraham()
New Shepherds must be stored to disk.


Abraham

public Abraham(ShepFlag ignored,
               int hash,
               FlockInfo info)
This is the root of the automatically generated constructors for creating Stubs.


Abraham

public Abraham(int hash)
This is for shepherds that are becoming from another shepherd.


Abraham

public Abraham(int hash,
               FlockInfo info)
This is for ShepherdStubs that use the hash and forgetFlag from the object for which they
are stubbing.


Abraham

public Abraham(Rcvr receiver)
Method Detail

becomeStub

public void becomeStub()
Replace the shepherd in memory with a type compatible stub
instance that shares the same hash and flockInfo.


destruct

public void destruct()
Called when an object is leaving RAM. Additional behavior for subclasses of Abraham:
Tell the snarfPacker that I am leaving RAM and should be removed from its tables.

Overrides:
destruct in class Heaper

dismantle

public void dismantle()
Disconnect me from the universe and throw me off the disk.
For GC safety, we keep a strongptr to ourself -- is this still necessary?


diskUpdate

public void diskUpdate()
The receiver has changed and so must eventually be rewritten to disk.


forget

public void forget()
Record on disk that there are no more persistent pointers to the receiver. When the in
core pointers go away, the receiver can be dismantled from disk. That will happen
eventually.


newShepherd

public void newShepherd()
The receiver has just been created. Put it on disk.


remember

public void remember()
Record that there are now persistent pointers to the receiver.


destroy

public void destroy()
Tell the packer I want to go away. It will mark me
as forgotten and actually dismantle me when it next
exits a consistent block. This avoids Jackpotting
when destroying a tree of objects.

Overrides:
destroy in class Heaper

actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class Heaper

contentsHash

public int contentsHash()
A hash of the contents of this flock


isEqual

public boolean isEqual(Heaper other)
Description copied from class: Heaper
Return true if the two objects are equal.

Overrides:
isEqual in class Heaper

isPurgeable

public boolean isPurgeable()
Return false only if the object cannot be flushed to disk. This will probably
only be false for Stamps and the like that contain session level pointers.


isShepherd

public boolean isShepherd()
This should be replaced with an isKindOf: that first checks to see
if you're asking about Abraham, and then otherwise possible faults.


isStub

public boolean isStub()
Distinguish between stubs and shepherds.


isUnlocked

public boolean isUnlocked()
All manually generated subclasses are locked. Automatically
defined unlocked classes will reimplement this.

Overrides:
isUnlocked in class Heaper

fetchInfo

public FlockInfo fetchInfo()
Return the object that describes the state of this flock wrt disk.


flockInfo

public void flockInfo(FlockInfo info)
Set the object that knows where this flock is on disk. Change it when the object moves.


getInfo

public FlockInfo getInfo()
Return the object that describes the state of this flock wrt disk.


getShepherdStubCategory

public Category getShepherdStubCategory()
Return the category of stubs used for the receiver. Shepherd Patriarch classes reimplement
this to use more specific Stub types.


token

public int token()
Return the object that describes the state of this flock wrt disk.


restartAbraham

public void restartAbraham(Rcvr trans)

isKindOf

public boolean isKindOf(Category cat)
Optimized for Abraham because xcvrs use it so much.


restartAbraham

public void restartAbraham()

sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Description copied from class: Heaper
do nothing

Overrides:
sendSelfTo in class Heaper

dismantleStatistics

public static void dismantleStatistics()

cleanupGarbage

public static void cleanupGarbage()
Description copied from class: Heaper
Heaper cleanupGarbage


initTimeNonInherited

public static void initTimeNonInherited()

linkTimeNonInherited

public static void linkTimeNonInherited()

staticTimeNonInherited

public static void staticTimeNonInherited()

isConstructed

public static boolean isConstructed(Heaper obj)

isDestructed

public static boolean isDestructed(Heaper obj)

fetchShepherd

public static Abraham fetchShepherd(int token)

returnToken

public static void returnToken(int token)


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