org.abora.gold.turtle
Class Agenda

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.snarf.Abraham
                    |
                    +--org.abora.gold.turtle.AgendaItem
                          |
                          +--org.abora.gold.turtle.Agenda

public class Agenda
extends AgendaItem

An AgendaItem composed of other AgendaItems. My stepping action consists of stepping one
of my component items. When I exhaust a component item, I unregister and destroy it.
Note: The order in which I select a component item is currently unspecified and
uncontrolled (depending on "MuSet::stepper()"). Eventually, it may make sense for me to
use the Escalator Algorithm to do prioritized scheduling.
Empty Agendas are also made as do-nothing AgendaItems. The currently get duely get
scheduled, stepped, and unscheduled. A possible optimization would be to avoid scheduling
do-nothing AgendaItems.


Field Summary
protected  MuSet myToDoList
           
 
Fields inherited from class org.abora.gold.snarf.Abraham
DismantleStatistics, myHash, myInfo, myToken, 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
Agenda()
           
Agenda(Rcvr receiver)
           
 
Method Summary
 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 Heaper make()
           
 void registerItem(AgendaItem item)
          By registering the item, we ensure that if we crash and reboot, the item will be
eventually and repeatedly stepped until step returns FALSE, provided we are registered up
through the Turtle.
 void sendSelfTo(Xmtr xmtr)
          do nothing
 boolean step()
          'step' one of my component items.
 void unregisterItem(AgendaItem item)
          An item should be unregistered either when it is done (when 'step' returns FALSE) or when
it no longer represents something that needs to be done should we crash and reboot.
Unregistering an item which is not registered and already forgotten is legal and has no
effect.
 
Methods inherited from class org.abora.gold.turtle.AgendaItem
forgetYourself, newShepherd, rememberYourself, schedule, unschedule
 
Methods inherited from class org.abora.gold.snarf.Abraham
actualHashForEqual, becomeStub, cleanupGarbage, contentsHash, destroy, destruct, diskUpdate, dismantleStatistics, fetchInfo, fetchShepherd, flockInfo, forget, getInfo, getShepherdStubCategory, initTimeNonInherited, isConstructed, isDestructed, isEqual, isKindOf, isPurgeable, isShepherd, isStub, isUnlocked, linkTimeNonInherited, remember, restartAbraham, restartAbraham, returnToken, staticTimeNonInherited, token
 
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

myToDoList

protected MuSet myToDoList
Constructor Detail

Agenda

public Agenda()

Agenda

public Agenda(Rcvr receiver)
Method Detail

registerItem

public void registerItem(AgendaItem item)
By registering the item, we ensure that if we crash and reboot, the item will be
eventually and repeatedly stepped until step returns FALSE, provided we are registered up
through the Turtle. Do NOT multiply register the same item.


step

public boolean step()
'step' one of my component items. If I return FALSE, that means there's nothing currently
left to do. However, since more AgendaItems may get registered later, there may later be
something more for me to do, so I shouldn't necessarily be destroyed. This creates a
composition problem: If an Agenda is stored as an item within another Agenda, then when
the outer Agenda is stepped and it in turn steps the inner Agenda, if the inner Agenda
returns FALSE, the outer Agenda will destroy it. This is all legal and shouldn't be a
problem as long as one is aware of this behavior

Overrides:
step in class AgendaItem

unregisterItem

public void unregisterItem(AgendaItem item)
An item should be unregistered either when it is done (when 'step' returns FALSE) or when
it no longer represents something that needs to be done should we crash and reboot.
Unregistering an item which is not registered and already forgotten is legal and has no
effect.


dismantle

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

Overrides:
dismantle in class AgendaItem

sendSelfTo

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

Overrides:
sendSelfTo in class AgendaItem

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.