|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Realtime
This interface identifies classes whose instances can be moved to
different ObjectSpace for higher
performance and higher predictability.
Real-time objects may contain references to external real-time objects.
These referenced objects might have to be moved along when the real-time
object is moved. For example:
public class Person extends RealtimeObject { // Implements Realtime.
private Person _mother; // External.
private Person _father; // External.
private final FastList<Person> _children = new FastList<Person>();
...
public boolean move(ObjectSpace os) {
if (super.move(os)) { // Propagates to referenced objects.
_mother.move(os);
_father.move(os);
// The children list itself is part of this object
// and does not require any particular action, but it
// references external objects which need to be moved along.
for (Person child : _children) child.move(os);
return true; // For sub-classes to do their part.
}
return false;
}
}
| Nested Class Summary | |
|---|---|
static class |
Realtime.ObjectSpace
This class represents an object space which determinates when object recycling occurs. |
| Method Summary | |
|---|---|
boolean |
move(Realtime.ObjectSpace os)
Moves this real-time object to the specified object space. |
Text |
toText()
Returns the textual representation of this real-time object (equivalent to toString except that the returned value
can be allocated from the local context space). |
| Method Detail |
|---|
boolean move(Realtime.ObjectSpace os)
os - the object space to move this real-time object to.
true if the move has to be propagated to
external real-time references; false otherwise.Text toText()
toString except that the returned value
can be allocated from the local context space).
|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||