Interface Realtime
-
- All Known Implementing Classes:
- CharacterData, FastCollection, FastList, FastMap, FastSet, FastTable, RealtimeObject, StackReference, Text, TextBuilder
public interface RealtimeThis interface identifies classes whose instances can be moved to different
ObjectSpacefor 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
Nested Classes Modifier and Type Interface and Description static classRealtime.ObjectSpaceThis class represents an object space which determinates when object recycling occurs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanmove(Realtime.ObjectSpace os)Moves this real-time object to the specified object space.TexttoText()Returns the textual representation of this real-time object (equivalent totoStringexcept that the returned value can be allocated from the local context space).
-
-
-
Method Detail
-
move
boolean move(Realtime.ObjectSpace os)
Moves this real-time object to the specified object space.- Parameters:
os- the object space to move this real-time object to.- Returns:
trueif the move has to be propagated to external real-time references;falseotherwise.
-
toText
Text toText()
Returns the textual representation of this real-time object (equivalent totoStringexcept that the returned value can be allocated from the local context space).- Returns:
- this object's textual representation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG