org.abora.gold.spaces.unordered
Class IDSpace

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.spaces.basic.CoordinateSpace
                    |
                    +--org.abora.gold.spaces.unordered.IDSpace

public class IDSpace
extends CoordinateSpace

A space of IDs, which can generate globally unique IDs.
Implementation note:
myBackend - the identifier of the Server which generated this space. If NULL, then it was
generated by the current Server (unless mySpaceNumber is -1, in which case it is the
single global IDSpace shared by all Servers.
mySpaceNumber - identifies which space this is. If -1, then it is the global ID space, and
myBackend must be NULL.


Field Summary
protected  Sequence myBackend
           
protected  Counter myNewIDCounter
           
protected  IntegerVar mySpaceNumber
           
 
Fields inherited from class org.abora.gold.spaces.basic.CoordinateSpace
myAscending, myDescending, myEmptyRegion, myFullRegion, myIdentityDsp
 
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
IDSpace(Sequence backend, IntegerVar number, Counter counter)
           
 
Method Summary
 int actualHashForEqual()
           
 Sequence backend()
          Essential.
 UInt8Array export()
          Essential.
 Sequence fetchBackend()
           
 IDSpace fetchIDSpace()
          NULL if this is the global IDSpace, self otherwise
 void finishCreation()
           
static IDSpace global()
          Return the global ID space.
 Sequence identifier()
          A Sequence uniquely identifying this IDSpace, so that
FeServer::current ()->oldIDSpace (this->identifier ())
->isEqual (this)
static FilterSpace iDFilterSpace()
          The coordinate space of filters on IDRegions.
 IDRegion iDsFromServer(Sequence identifier)
          Essential.
static IDSpace importx(PrimIntArray data)
          Essential.
static void info()
          {UInt8Array CLIENT} export
{IDRegion CLIENT} iDsFromServer: identifier {Sequence}
{ID CLIENT} newID
{IDRegion CLIENT} newIDs: count {IntegerVar}
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
static Heaper make(Rcvr rcvr)
           
static Heaper make(Sequence identifier, IntegerVar number)
           
static Heaper make(Sequence identifier, IntegerVar number, Counter counter)
           
 ID newID()
          Essential.
 IDRegion newIDs(IntegerVar count)
          A region containing a finite number of globally unique IDs.
 ID oldID(Sequence identifier)
          Recreate an ID from its identifier.
 IDRegion oldIDs(Sequence backend, IntegerRegion numbers)
          Recreate a region of IDs from information that was stored outside the Server
static Filter openIDFilter()
           
 void printOn(java.io.PrintWriter oo)
           
 void sendIDSpaceTo(Xmtr xmtr)
           
 void sendSelfTo(Xmtr xmtr)
          do nothing
 IntegerVar spaceNumber()
          Essential.
static IDSpace unique()
          Essential.
 
Methods inherited from class org.abora.gold.spaces.basic.CoordinateSpace
ascending, completeMapping, descending, emptyRegion, fetchAscending, fetchDescending, finishCreate, fullRegion, getAscending, getDescending, identityDsp, identityMapping, importMapping, importOrderSpec, importRegion, mapping, mapping, orderSpec, region, verify
 
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, 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, 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

myBackend

protected Sequence myBackend

mySpaceNumber

protected IntegerVar mySpaceNumber

myNewIDCounter

protected Counter myNewIDCounter
Constructor Detail

IDSpace

public IDSpace(Sequence backend,
               IntegerVar number,
               Counter counter)
Method Detail

iDsFromServer

public IDRegion iDsFromServer(Sequence identifier)
Essential. The Region of IDs in this space which might be genrated by the given Server


newID

public ID newID()
Essential. A new ID guaranteed to be different from every other newID generated by this
IDSpace or any IDSpace isEqual to it, on any Server. (Although of course IDs generated
using this->oldID () may conflict if the right numbers happen to have been supplied.)


newIDs

public IDRegion newIDs(IntegerVar count)
A region containing a finite number of globally unique IDs. See newID for uniqueness
guarantees.


backend

public Sequence backend()
Essential. The Server which created this IDSpace


fetchBackend

public Sequence fetchBackend()

fetchIDSpace

public IDSpace fetchIDSpace()
NULL if this is the global IDSpace, self otherwise


oldIDs

public IDRegion oldIDs(Sequence backend,
                       IntegerRegion numbers)
Recreate a region of IDs from information that was stored outside the Server


spaceNumber

public IntegerVar spaceNumber()
Essential. Identifies this particular space among all those generated by the same Server.


finishCreation

public void finishCreation()

actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class CoordinateSpace

isEqual

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

Overrides:
isEqual in class CoordinateSpace

printOn

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

export

public UInt8Array export()
Essential. Produce an array which can be handed to Server::importIDSpace on any Server to
get back the same IDSpace


identifier

public Sequence identifier()
A Sequence uniquely identifying this IDSpace, so that
FeServer::current ()->oldIDSpace (this->identifier ())
->isEqual (this)


sendIDSpaceTo

public void sendIDSpaceTo(Xmtr xmtr)

oldID

public ID oldID(Sequence identifier)
Recreate an ID from its identifier.


sendSelfTo

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

Overrides:
sendSelfTo in class Heaper

global

public static IDSpace global()
Return the global ID space.


importx

public static IDSpace importx(PrimIntArray data)
Essential. Take some information describing an IDSpace and create the IDSpace it was
exported from.


unique

public static IDSpace unique()
Essential. Create a new globally unique space of IDs


make

public static Heaper make(Sequence identifier,
                          IntegerVar number)

make

public static Heaper make(Sequence identifier,
                          IntegerVar number,
                          Counter counter)

iDFilterSpace

public static FilterSpace iDFilterSpace()
The coordinate space of filters on IDRegions.


openIDFilter

public static Filter openIDFilter()

make

public static Heaper make(Rcvr rcvr)

info

public static void info()
{UInt8Array CLIENT} export
{IDRegion CLIENT} iDsFromServer: identifier {Sequence}
{ID CLIENT} newID
{IDRegion CLIENT} newIDs: count {IntegerVar}



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