org.abora.gold.proman
Class PromiseManager

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.proman.PromiseManager

public class PromiseManager
extends Heaper


Field Summary
protected static PtrArray AllRequests
           
protected  boolean amInsideRequest
           
protected static PtrArray LoginRequests
           
protected  IntegerVar myAcks
           
protected  PrimPtrTable myActuals
           
protected  DetectorEvent myDetectorEvents
           
protected  ExceptionRecord myError
           
protected  PtrArray myHandlers
           
protected  IntegerVar myNextClientPromise
           
protected  IntegerVar myNextServerPromise
           
protected  Portal myPortal
           
protected  XnReadStream myReadStream
           
protected  PrimIndexTable myRefCounts
           
protected  ByteShuffler myShuffler
           
protected  XnWriteStream myWriteStream
           
protected static Array OverrideArray
           
protected static Dictionary OverrideMap
           
protected static PtrArray PromiseClasses
           
 
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
PromiseManager(Portal portal, java.lang.String clientID, ByteShuffler shuffler)
           
 
Method Summary
static int ackResponse()
           
 int actualHashForEqual()
           
 void actualWaive(IntegerVar prnum)
          Release the promise argument.
 IntegerVar clientPromiseNumber()
           
static void delayCast(PromiseManager pm)
           
 void destruct()
          Classes should implement this message rather than a destructor.
static int doneResponse()
           
static void equals(PromiseManager pm)
           
static int errorResponse()
           
static int excusedResponse()
           
static void export0(PromiseManager pm)
          The zero argument version of PrimArray export.
static void export1(PromiseManager pm)
          The one argument version of PrimArray export.
static void export2(PromiseManager pm)
          The two argument version of PrimArray export.
 boolean fetchBooleanVar()
          Optimize promise arguments that are expected to point at IntValues.
 Category fetchCategory()
           
 Heaper fetchHeaper(Category cat)
           
 int fetchInt32()
           
 IntegerVar fetchIntegerVar()
          Optimize promise arguments that are expected to point at IntValues.
 Heaper fetchNonNullHeaper(Category cat)
           
static void fillClassTable(PtrArray table)
           
static void fillDetector(PromiseManager pm)
          Create the comm detector and add it.
static int filledResponse()
           
static void fillRangeDetector(PromiseManager pm)
          Create the comm detector and add it.
static void fillRequestTable(PtrArray table)
          Requests for class Promise
static void fillRequestTable1(PtrArray table)
           
static void fillRequestTable2(PtrArray table)
           
static void fillRequestTable3(PtrArray table)
           
static void fillRequestTable4(PtrArray table)
           
static void fillRequestTable5(PtrArray table)
           
 void flushAcks()
          If any acks have accumulated, flush them.
 void force()
           
static void force(PromiseManager pm)
           
static void forceIt(PromiseManager pm)
           
static int grabbedResponse()
           
 void handleRequest()
           
static int humberResponse()
           
static int humbersResponse()
           
static int IEEEResponse()
           
static int IEEEsResponse()
           
static void initTimeNonInherited()
           
static int intsResponse()
           
static void linkTimeNonInherited()
           
static Heaper make(Portal portal)
           
static void makeFloat(PromiseManager pm)
           *
static void makeFloatArray(PromiseManager pm)
           
static void makeHumber(PromiseManager pm)
           
static void makeHumberArray(PromiseManager pm)
           
static void makeIntArray(PromiseManager pm)
           
static void makePtrArray(PromiseManager pm)
          If any of the promises is an error, then pm won't return the PtrArray.
static PtrArray makeRequestTable()
          PromiseManager makeRequestTable.
static void mapOverride(java.lang.Object sel, java.lang.Object classx, java.lang.Object argCount)
          The table of classes and their selectors overridden by special handlers.
 boolean noErrors()
          Return true if no errors have occurred in the current transaction.
static void noRequest(PromiseManager pm)
          For illegal requests.
static void notLoggedInRequest(PromiseManager pm)
          For illegal requests.
static int problemNumber(java.lang.String prob)
          The number that gets sent over the wire for the given problem name
static void problems()
          A ProblemList for all X++ BLASTs
static int problemSource(java.lang.String file, int line)
          The number that gets sent over the wire for the given problem file/line number
static void promiseHash(PromiseManager pm)
           
static int promisesResponse()
           
 void queueDetectorEvent(DetectorEvent event)
          Queue up the detector event.
static int rangeFilledResponse()
           
 XnReadStream readStream()
           
 IntegerVar receiveIntegerVar()
          A new representation that requires less shifting (eventually).
 int receiveRequestNumber()
          Receive a request number.
static int releasedResponse()
           
 void respondBooleanVar(boolean val)
           
 void respondError()
           
 void respondHeaper(Heaper result)
           
 void respondIntegerVar(IntegerVar val)
           
 void respondProblem(Problem problem)
           
 void respondVoid()
           
static int revisedResponse()
           
static void revisionDetector(PromiseManager pm)
          Create the comm detector and add it.
 void sendHumbers(IntegerVarArray array, int count, int start)
          Send a bunch of IntegerVars to the client.
 void sendIEEE32(float f)
           
 void sendIEEE64(double f)
           
 void sendIEEEs(PrimFloatArray array, int count, int start)
          Send a bunch of fixed precision integers to the client.
 void sendIntegerVar(IntegerVar num)
          Send a Dean style humber.
 void sendInts(PrimIntArray array, int count, int start)
          Send a bunch of fixed precision integers to the client.
 void sendPromise(Heaper heaper)
          Register heaper with the next Server promise number and increment it.
 void sendPromises(PtrArray array, int count, int start)
          Register heaper with the next Server promise number and increment it.
 void sendResponse(int num)
          Use a representation optimized for small positive numbers.
 IntegerVar serverPromiseNumber()
           
static void setCurrentAuthor(PromiseManager pm)
          The one argument version of PrimArray export.
static void setCurrentKeyMaster(PromiseManager pm)
          Set the fluid.
static void setInitialEditClub(PromiseManager pm)
          Set the fluid.
static void setInitialOwner(PromiseManager pm)
          Set the fluid.
static void setInitialReadClub(PromiseManager pm)
          Set the fluid.
static void setInitialSponsor(PromiseManager pm)
          Set the fluid.
static void shutdown(PromiseManager pm)
           
static void statusDetector(PromiseManager pm)
          Create the comm detector and add it.
static int terminatedResponse()
           
static void testKindOf(PromiseManager pm)
           
static void waitForConsequences(PromiseManager pm)
          Create the comm detector and add it.
static void waitForWrite(PromiseManager pm)
          Create the comm detector and add it.
 void waive()
          Release the promise argument.
static void waive(PromiseManager pm)
           
static void waiveEm(PromiseManager pm)
           
static void waiveIt(PromiseManager pm)
           
 void waiveMany()
          Release a range of promise argument, given a start and a count.
 
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, 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, 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

myPortal

protected Portal myPortal

myReadStream

protected XnReadStream myReadStream

myWriteStream

protected XnWriteStream myWriteStream

myActuals

protected PrimPtrTable myActuals

myRefCounts

protected PrimIndexTable myRefCounts

myDetectorEvents

protected DetectorEvent myDetectorEvents

myNextClientPromise

protected IntegerVar myNextClientPromise

myNextServerPromise

protected IntegerVar myNextServerPromise

myHandlers

protected PtrArray myHandlers

myAcks

protected IntegerVar myAcks

myError

protected ExceptionRecord myError

amInsideRequest

protected boolean amInsideRequest

myShuffler

protected ByteShuffler myShuffler

AllRequests

protected static PtrArray AllRequests

LoginRequests

protected static PtrArray LoginRequests

OverrideArray

protected static Array OverrideArray

OverrideMap

protected static Dictionary OverrideMap

PromiseClasses

protected static PtrArray PromiseClasses
Constructor Detail

PromiseManager

public PromiseManager(Portal portal,
                      java.lang.String clientID,
                      ByteShuffler shuffler)
Method Detail

force

public void force()

handleRequest

public void handleRequest()

noErrors

public boolean noErrors()
Return true if no errors have occurred in the current transaction.


queueDetectorEvent

public void queueDetectorEvent(DetectorEvent event)
Queue up the detector event. It will be executed after the next transaction.


waive

public void waive()
Release the promise argument. This could return a value because the PromiseManager
doesn't keep any state for void promises.


waiveMany

public void waiveMany()
Release a range of promise argument, given a start and a count. This could return a value
because the PromiseManager doesn't keep any state for void promises.


fetchBooleanVar

public boolean fetchBooleanVar()
Optimize promise arguments that are expected to point at IntValues.


fetchCategory

public Category fetchCategory()

fetchHeaper

public Heaper fetchHeaper(Category cat)

fetchInt32

public int fetchInt32()

fetchIntegerVar

public IntegerVar fetchIntegerVar()
Optimize promise arguments that are expected to point at IntValues.


fetchNonNullHeaper

public Heaper fetchNonNullHeaper(Category cat)

receiveIntegerVar

public IntegerVar receiveIntegerVar()
A new representation that requires less shifting (eventually).


respondBooleanVar

public void respondBooleanVar(boolean val)

respondHeaper

public void respondHeaper(Heaper result)

respondIntegerVar

public void respondIntegerVar(IntegerVar val)

respondVoid

public void respondVoid()

sendIEEE32

public void sendIEEE32(float f)

sendIEEE64

public void sendIEEE64(double f)

sendIntegerVar

public void sendIntegerVar(IntegerVar num)
Send a Dean style humber. Like Drexler style, except all the tag bits go into the first
byte.


sendPromise

public void sendPromise(Heaper heaper)
Register heaper with the next Server promise number and increment it. The client must
stay in sync.


sendResponse

public void sendResponse(int num)
Use a representation optimized for small positive numbers.


sendHumbers

public void sendHumbers(IntegerVarArray array,
                        int count,
                        int start)
Send a bunch of IntegerVars to the client.


sendIEEEs

public void sendIEEEs(PrimFloatArray array,
                      int count,
                      int start)
Send a bunch of fixed precision integers to the client.


sendInts

public void sendInts(PrimIntArray array,
                     int count,
                     int start)
Send a bunch of fixed precision integers to the client.


sendPromises

public void sendPromises(PtrArray array,
                         int count,
                         int start)
Register heaper with the next Server promise number and increment it. The client must
stay in sync.


actualWaive

public void actualWaive(IntegerVar prnum)
Release the promise argument. This could return a value because the PromiseManager
doesn't keep any state for void promises.


clientPromiseNumber

public IntegerVar clientPromiseNumber()

flushAcks

public void flushAcks()
If any acks have accumulated, flush them.


readStream

public XnReadStream readStream()

receiveRequestNumber

public int receiveRequestNumber()
Receive a request number. The first byte is either between 0 and 254 or it
is 255 and the second byte + 255 is the number.


respondError

public void respondError()

respondProblem

public void respondProblem(Problem problem)

serverPromiseNumber

public IntegerVar serverPromiseNumber()

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 Heaper

actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class Heaper

problems

public static void problems()
Description copied from class: Heaper
A ProblemList for all X++ BLASTs


ackResponse

public static int ackResponse()

doneResponse

public static int doneResponse()

errorResponse

public static int errorResponse()

excusedResponse

public static int excusedResponse()

filledResponse

public static int filledResponse()

grabbedResponse

public static int grabbedResponse()

humberResponse

public static int humberResponse()

humbersResponse

public static int humbersResponse()

IEEEResponse

public static int IEEEResponse()

IEEEsResponse

public static int IEEEsResponse()

intsResponse

public static int intsResponse()

problemNumber

public static int problemNumber(java.lang.String prob)
The number that gets sent over the wire for the given problem name


problemSource

public static int problemSource(java.lang.String file,
                                int line)
The number that gets sent over the wire for the given problem file/line number


promisesResponse

public static int promisesResponse()

rangeFilledResponse

public static int rangeFilledResponse()

releasedResponse

public static int releasedResponse()

revisedResponse

public static int revisedResponse()

terminatedResponse

public static int terminatedResponse()

initTimeNonInherited

public static void initTimeNonInherited()

linkTimeNonInherited

public static void linkTimeNonInherited()

make

public static Heaper make(Portal portal)

fillDetector

public static void fillDetector(PromiseManager pm)
Create the comm detector and add it.


fillRangeDetector

public static void fillRangeDetector(PromiseManager pm)
Create the comm detector and add it.


revisionDetector

public static void revisionDetector(PromiseManager pm)
Create the comm detector and add it.


statusDetector

public static void statusDetector(PromiseManager pm)
Create the comm detector and add it.


waitForConsequences

public static void waitForConsequences(PromiseManager pm)
Create the comm detector and add it.


waitForWrite

public static void waitForWrite(PromiseManager pm)
Create the comm detector and add it.


delayCast

public static void delayCast(PromiseManager pm)

equals

public static void equals(PromiseManager pm)

export0

public static void export0(PromiseManager pm)
The zero argument version of PrimArray export.


export1

public static void export1(PromiseManager pm)
The one argument version of PrimArray export.


export2

public static void export2(PromiseManager pm)
The two argument version of PrimArray export.


forceIt

public static void forceIt(PromiseManager pm)

makeRequestTable

public static PtrArray makeRequestTable()
PromiseManager makeRequestTable.


noRequest

public static void noRequest(PromiseManager pm)
For illegal requests.


notLoggedInRequest

public static void notLoggedInRequest(PromiseManager pm)
For illegal requests.


promiseHash

public static void promiseHash(PromiseManager pm)

setCurrentAuthor

public static void setCurrentAuthor(PromiseManager pm)
The one argument version of PrimArray export.


setCurrentKeyMaster

public static void setCurrentKeyMaster(PromiseManager pm)
Set the fluid.


setInitialEditClub

public static void setInitialEditClub(PromiseManager pm)
Set the fluid.


setInitialOwner

public static void setInitialOwner(PromiseManager pm)
Set the fluid.


setInitialReadClub

public static void setInitialReadClub(PromiseManager pm)
Set the fluid.


setInitialSponsor

public static void setInitialSponsor(PromiseManager pm)
Set the fluid.


shutdown

public static void shutdown(PromiseManager pm)

testKindOf

public static void testKindOf(PromiseManager pm)

waiveEm

public static void waiveEm(PromiseManager pm)

waiveIt

public static void waiveIt(PromiseManager pm)

makeFloat

public static void makeFloat(PromiseManager pm)
*


makeFloatArray

public static void makeFloatArray(PromiseManager pm)

makeHumber

public static void makeHumber(PromiseManager pm)

makeHumberArray

public static void makeHumberArray(PromiseManager pm)

makeIntArray

public static void makeIntArray(PromiseManager pm)

makePtrArray

public static void makePtrArray(PromiseManager pm)
If any of the promises is an error, then pm won't return the PtrArray.


mapOverride

public static void mapOverride(java.lang.Object sel,
                               java.lang.Object classx,
                               java.lang.Object argCount)
The table of classes and their selectors overridden by special handlers.


force

public static void force(PromiseManager pm)

waive

public static void waive(PromiseManager pm)

fillClassTable

public static void fillClassTable(PtrArray table)

fillRequestTable1

public static void fillRequestTable1(PtrArray table)

fillRequestTable2

public static void fillRequestTable2(PtrArray table)

fillRequestTable3

public static void fillRequestTable3(PtrArray table)

fillRequestTable4

public static void fillRequestTable4(PtrArray table)

fillRequestTable5

public static void fillRequestTable5(PtrArray table)

fillRequestTable

public static void fillRequestTable(PtrArray table)
Requests for class Promise



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