uka.transport
Interface SharedObjectSpace

All Superinterfaces:
ObjectSpace
All Known Implementing Classes:
DefaultSharedObjectSpace, PartitionedObjectSpace.SubSpace

public interface SharedObjectSpace
extends ObjectSpace

An object space that shares some of its objects with some other object space.


Method Summary
 void checkConsistency(java.util.logging.Logger log)
           
 IntIterator getNewIDs()
          The creation of new identifiers in calls to ObjectSpace.getID(java.lang.Object) and ObjectSpace.setObject(int, java.lang.Object) is logged in a set newIDs.
 IntIterator getNewlySharedIDs()
          If an identifier of this object space becomes shared, it is first inserted into the set newlySharedIDs.
 IntIterator getNewlyUnsharedIDs()
           
 IntIterator getSharedIDs()
          Objects corresponding to identifiers in this object space can eiter be shared or non-shared.
 void resetNewIDs()
          Empties the set newIDs and flushes the information in newlySharedIDs and newlyUnsharedIDs to sharedIDs.
 
Methods inherited from interface uka.transport.ObjectSpace
clear, findID, getID, getObject, getUsedIDs, includeID, isAccepted, isIncluded, isShared, isUsed, remove, resetObject, setObject
 

Method Detail

getSharedIDs

public IntIterator getSharedIDs()

Objects corresponding to identifiers in this object space can eiter be shared or non-shared. If an object is consedered shared or non-shared depends on the concrete object space.

Operation on this object space (inclusion of objects, adding objects to sub-spaces, and so on) never modify the set of shared identifiers directly. Instead, the two journals newlySharedIDs and newlyUnsharedIDs are updated. These journals are flushed into the shared identifier set via a call to resetNewIDs().

Returns:
an iterator over currently shared identifiers.

getNewIDs

public IntIterator getNewIDs()
The creation of new identifiers in calls to ObjectSpace.getID(java.lang.Object) and ObjectSpace.setObject(int, java.lang.Object) is logged in a set newIDs.

Returns:
an iterator over all identifiers that have been assigned in this object space after the last call to resetNewIDs().

getNewlySharedIDs

public IntIterator getNewlySharedIDs()
If an identifier of this object space becomes shared, it is first inserted into the set newlySharedIDs. A call to resetNewIDs() flushes this information to sharedIDs.

Returns:
an iterator over all newly shared identifiers in this object space.

getNewlyUnsharedIDs

public IntIterator getNewlyUnsharedIDs()
See Also:
getNewlySharedIDs()

resetNewIDs

public void resetNewIDs()
Empties the set newIDs and flushes the information in newlySharedIDs and newlyUnsharedIDs to sharedIDs.


checkConsistency

public void checkConsistency(java.util.logging.Logger log)