org.abora.gold.snarf
Class FlockInfo

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.snarf.FlockLocation
                    |
                    +--org.abora.gold.snarf.FlockInfo
Direct Known Subclasses:
TestFlockInfo

public class FlockInfo
extends FlockLocation

Contains all the information the packer needs to know about the flock on disk (except
forwarder stuff). The packer knows about forwarders by having several FlockInfo objects
for the same flock. We should consider having a separate class for forward information
that does not contain the flags and the oldSize.
myOldSize - this is the size of the flock on disk as of the last commit. If this is zero,
it is uninitialized. This is used to refitting without bringing in the snarf for this
flock.
myFlags - keeps track of whether the receive is a new flock (isn''t on disk yet), is
forgotten, is in the process is fchanging its forggten state (isChanging), and is Update
(contents have changed).


Field Summary
protected  int myFlags
           
protected  byte myFlockHash
           
protected  int myOldSize
           
protected  int myToken
           
protected static PrimPtrTable TheFlockCategoryTable
           
 
Fields inherited from class org.abora.gold.snarf.FlockLocation
myIndex, mySnarfID
 
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
FlockInfo(Abraham shep, SnarfID snarfID, int index, int flags, int size)
           
 
Method Summary
 void clearContentsDirty()
          Reset my contentsDirty flag.
 void commitFlags()
          A write to the disk has happened.
static int contentsDirty()
           
static int destroyed()
           
static int dismantled()
           
 Abraham fetchShepherd()
           
 int flags()
           
 byte flockHash()
           
static FlockInfo forgotten(Abraham shep, SnarfID snarfID, int index)
           
static int forgottenMask()
           
static int forgottenStateDirty()
           
 void forward(int index)
          As a freshly forwarded flock, I'll be treated as new for a while.
static int forwarded()
           
static FlockInfo getInfo(int index)
           
 Abraham getShepherd()
           
 boolean isContentsDirty()
          Return true if my shepherd has changed and informed the SnarfPacker.
 boolean isDestroyed()
          Return true if our shepherd has received destroy
 boolean isDirty()
          Return true if anything about my flock is changing (including if the flock is new).
 boolean isDismantled()
          Return true if our shepherd has been dismantled
 boolean isForgotten()
          Return true if my Shepherd's new state is it should be forgotten.
 boolean isForgottenStateDirty()
          Return true if the shepherd I describe is changing between being forgotten and being
remembered.
 boolean isForwarded()
          Return true if my shepherd has been forwarded.
 boolean isNew()
          Return true if the associated flock is new.
static int isNewMask()
           
static Heaper make(Abraham shep, IntegerVar index)
          Make a ShepherdLocation for a new shepherd.
static Heaper make(FlockInfo info, SnarfID snarfID, int index)
          Make a flockInfo to a new location for the same shepherd.
 boolean markContentsDirty()
          Set my contentsDirty flag.
 void markDestroyed()
          Set my shepNull flag.
 void markDismantled()
          Set my Dismantled flag.
 boolean markForgotten()
          Set my Forgotten flag.
 boolean markRemembered()
          Clear my Forgotten flag.
 void markShepNull()
          Set my shepNull flag.
 int oldSize()
           
 void printOn(java.io.PrintWriter oo)
           
 void registerInfo()
          Register this info as the best known informatino about the flock.
static FlockInfo remembered(Abraham shep, SnarfID snarfID, int index)
           
static void removeInfo(int token)
           
 void setSize(int size)
           
static int shepNullInPersistent()
           
static void staticTimeNonInherited()
           
static boolean testContentsDirty(FlockInfo info)
           
static boolean testForgotten(FlockInfo info)
           
 int token()
           
 boolean wasForgotten()
          Return true if my shepherd was forgotten after the last commit.
 boolean wasShepNullInPersistent()
          Return true if our shepherd pointer was NULL in makePersistent
 
Methods inherited from class org.abora.gold.snarf.FlockLocation
actualHashForEqual, index, index, isEqual, make, snarfID
 
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, cleanupGarbage, 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, destruct, 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, linkTimeNonInherited, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, 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

myFlockHash

protected byte myFlockHash

myToken

protected int myToken

myFlags

protected int myFlags

myOldSize

protected int myOldSize

TheFlockCategoryTable

protected static PrimPtrTable TheFlockCategoryTable
Constructor Detail

FlockInfo

public FlockInfo(Abraham shep,
                 SnarfID snarfID,
                 int index,
                 int flags,
                 int size)
Method Detail

isContentsDirty

public boolean isContentsDirty()
Return true if my shepherd has changed and informed the SnarfPacker.


isDestroyed

public boolean isDestroyed()
Return true if our shepherd has received destroy


isDirty

public boolean isDirty()
Return true if anything about my flock is changing (including if the flock is new).


isDismantled

public boolean isDismantled()
Return true if our shepherd has been dismantled


isForgotten

public boolean isForgotten()
Return true if my Shepherd's new state is it should be forgotten.


isForgottenStateDirty

public boolean isForgottenStateDirty()
Return true if the shepherd I describe is changing between being forgotten and being
remembered.


isForwarded

public boolean isForwarded()
Return true if my shepherd has been forwarded.


isNew

public boolean isNew()
Return true if the associated flock is new. If so, myIndex
is an offset into the new flocks table inside the SnarfPacker.


wasForgotten

public boolean wasForgotten()
Return true if my shepherd was forgotten after the last commit.


wasShepNullInPersistent

public boolean wasShepNullInPersistent()
Return true if our shepherd pointer was NULL in makePersistent


clearContentsDirty

public void clearContentsDirty()
Reset my contentsDirty flag. This is primarily used to know when a flock has
changed again after some info has been computed from it.


commitFlags

public void commitFlags()
A write to the disk has happened. Commit all the changes in the flags.


flags

public int flags()

flockHash

public byte flockHash()

forward

public void forward(int index)
As a freshly forwarded flock, I'll be treated as new for a while.


markContentsDirty

public boolean markContentsDirty()
Set my contentsDirty flag. Return false if I was already dirty (in either way).


markDestroyed

public void markDestroyed()
Set my shepNull flag.


markDismantled

public void markDismantled()
Set my Dismantled flag. BLAST if already set.


markForgotten

public boolean markForgotten()
Set my Forgotten flag. Return false if I was already dirty.


markRemembered

public boolean markRemembered()
Clear my Forgotten flag. Return false if I was already dirty.


markShepNull

public void markShepNull()
Set my shepNull flag.


oldSize

public int oldSize()

setSize

public void setSize(int size)

fetchShepherd

public Abraham fetchShepherd()

getShepherd

public Abraham getShepherd()

registerInfo

public void registerInfo()
Register this info as the best known informatino about the flock.


token

public int token()

printOn

public void printOn(java.io.PrintWriter oo)
Overrides:
printOn in class FlockLocation

forgotten

public static FlockInfo forgotten(Abraham shep,
                                  SnarfID snarfID,
                                  int index)

make

public static Heaper make(Abraham shep,
                          IntegerVar index)
Make a ShepherdLocation for a new shepherd. Index is the index into
the new flocks table in the snarfPacker. The newmask indicates
that the index is into the newFlocks table rather than a snarf.


make

public static Heaper make(FlockInfo info,
                          SnarfID snarfID,
                          int index)
Make a flockInfo to a new location for the same shepherd. Clear the new flag, and keep
the rest the same.


remembered

public static FlockInfo remembered(Abraham shep,
                                   SnarfID snarfID,
                                   int index)

testContentsDirty

public static boolean testContentsDirty(FlockInfo info)

testForgotten

public static boolean testForgotten(FlockInfo info)

contentsDirty

public static int contentsDirty()

destroyed

public static int destroyed()

dismantled

public static int dismantled()

forgottenMask

public static int forgottenMask()

forgottenStateDirty

public static int forgottenStateDirty()

forwarded

public static int forwarded()

isNewMask

public static int isNewMask()

shepNullInPersistent

public static int shepNullInPersistent()

staticTimeNonInherited

public static void staticTimeNonInherited()

getInfo

public static FlockInfo getInfo(int index)

removeInfo

public static void removeInfo(int token)


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