|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An object space is a bidirectional mapping between a set of objects and a set of integer values.
| Method Summary | |
void |
clear()
Clears the object space by removing all identifier assignments. |
int |
findID(java.lang.Object obj)
Same as getID(java.lang.Object), but does not assign the object to this
object space, if the object was not yet a member. |
int |
getID(java.lang.Object obj)
Returns the identifier for a given object. |
java.lang.Object |
getObject(int id)
Finds the object for a given identifier. |
IntIterator |
getUsedIDs()
|
void |
includeID(int id)
Make the object that corresponds to the given identifier part of this object space. |
boolean |
isAccepted(int id)
Decides whether an object reference should be blocked during transmission through a MarshalStream/UnmarshalStream pair. |
boolean |
isIncluded(int id)
Decides whether the obect that corresponds to the given identifier is part of this object space. |
boolean |
isShared(int id)
|
boolean |
isUsed(int id)
Checks whether this object space has an object assigned to the given identifier. |
void |
remove(int id)
Removes the given identifer from this object space. |
void |
resetObject(int id,
java.lang.Object obj)
Reassigns a new object to an existing identifier. |
void |
setObject(int id,
java.lang.Object obj)
Assigns the given object to an application provided identifier and includes the given object to this object
space. |
| Method Detail |
public void setObject(int id,
java.lang.Object obj)
includes the given object to this object
space.
public void resetObject(int id,
java.lang.Object obj)
removing the identifier first and
then reassigning it with setObject(int, java.lang.Object). Since
setObject(int, java.lang.Object) may be overridden in subclasses to handle
the first assignment of an identifier especially, resetObject(int, java.lang.Object) can be used to avoid additional calls to setObject(int, java.lang.Object).
public java.lang.Object getObject(int id)
getID(java.lang.Object) call that
returned the given identifier.public int getID(java.lang.Object obj)
ObjectSpace the first time, the #isNew method returns true for the resulting
identifier.
public int findID(java.lang.Object obj)
getID(java.lang.Object), but does not assign the object to this
object space, if the object was not yet a member.
public boolean isUsed(int id)
isUsed(int) returns true
for identifier returned from getID(java.lang.Object).
public void includeID(int id)
isIncluded(int) method returns true for the
corresponding identifier. An object can have an assigned
identifier in some object space without being part of that
object space.
public boolean isIncluded(int id)
includeID(int)public boolean isShared(int id)
public boolean isAccepted(int id)
MarshalStream/UnmarshalStream pair. If a call to isAccepted(int) on the
ObjectSpace of the sender-side stream returns
false for an object identifier, a reference to the
corresponding object is blocked (replaced with
null).
public IntIterator getUsedIDs()
public void remove(int id)
getID(java.lang.Object) with the object corresponding to the given
identifier as argument will result in a new
identifier.
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||