Documentation of 'javolution37.javolution.realtime.Realtime' Java class
Realtime
javolution37.javolution.realtime

Interface Realtime

  • All Known Implementing Classes:
    CharacterData, FastCollection, FastList, FastMap, FastSet, FastTable, RealtimeObject, StackReference, Text, TextBuilder


    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

      Nested Classes 
      Modifier and Type Interface and Description
      static class  Realtime.ObjectSpace
      This 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
      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

      • 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:
        true if the move has to be propagated to external real-time references; false otherwise.
      • toText

        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).
        Returns:
        this object's textual representation.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.