javax.realtime
Class VTMemory

java.lang.Object
  |
  +--javax.realtime.MemoryArea
        |
        +--javax.realtime.ScopedMemory
              |
              +--javax.realtime.VTMemory

public class VTMemory
extends ScopedMemory

The execution time of an allocation from a VTMemory area may take a variable amount of time. However, since VTMemory areas are not subject to garbage collection and objects within it may not be moved, these areas can be used by instances of NoHeapRealtimeThread.


Constructor Summary
VTMemory(long initialSizeInBytes, long maxSizeInBytes)
          Creates a VTMemory of the given size.
VTMemory(long initialSizeInBytes, long maxSizeInBytes, java.lang.Runnable logic)
          Creates a VTMemory of the given size and logic.
VTMemory(SizeEstimator initial, SizeEstimator maximum)
          Creates a VTMemory of the given size estimated by two instances of SizeEstimator.
VTMemory(SizeEstimator initial, SizeEstimator maximum, java.lang.Runnable logic)
          Creates a VTMemory of the given size estimated by two instances of SizeEstimator and logic.
 
Method Summary
 long getMaximumSize()
          Return the value which defines the maximum size to which this can grow.
 java.lang.String toString()
          Returns a user-friendly representation of this ScopedMemory.
 
Methods inherited from class javax.realtime.ScopedMemory
enter, enter, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, setPortal
 
Methods inherited from class javax.realtime.MemoryArea
executeInArea, getMemoryArea, memoryConsumed, memoryRemaining, newArray, newInstance, newInstance, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VTMemory

public VTMemory(long initialSizeInBytes,
                long maxSizeInBytes)
Creates a VTMemory of the given size.
Parameters:
initialSizeInBytes - The size in bytes of the memory to initially allocate for this area.
maximumSizeInBytes - The maximum size in bytes this memory area can grow to.

VTMemory

public VTMemory(long initialSizeInBytes,
                long maxSizeInBytes,
                java.lang.Runnable logic)
Creates a VTMemory of the given size and logic.
Parameters:
initialSizeInBytes - The size in bytes of the memory to initially allocate for this area.
maximumSizeInBytes - The maximum size in bytes this memory area can grow to.
logic - The logic associated with this.

VTMemory

public VTMemory(SizeEstimator initial,
                SizeEstimator maximum)
Creates a VTMemory of the given size estimated by two instances of SizeEstimator.
Parameters:
initial - The instance of SizeEstimator which will set the initial allocation allocate for this area.
maximum - The instance of SizeEstimator which will set the maximum allocation allocate for this area.

VTMemory

public VTMemory(SizeEstimator initial,
                SizeEstimator maximum,
                java.lang.Runnable logic)
Creates a VTMemory of the given size estimated by two instances of SizeEstimator and logic.
Parameters:
initial - The instance of SizeEstimator which will set the initial allocation allocate for this area.
maximum - The instance of SizeEstimator which will set the maximum allocation allocate for this area.
logic - The logic associated with this.
Method Detail

getMaximumSize

public long getMaximumSize()
Return the value which defines the maximum size to which this can grow.
Overrides:
getMaximumSize in class ScopedMemory
Following copied from class: javax.realtime.ScopedMemory
Returns:
The maximum size attainable.

toString

public java.lang.String toString()
Description copied from class: ScopedMemory
Returns a user-friendly representation of this ScopedMemory.
Overrides:
toString in class ScopedMemory
Following copied from class: javax.realtime.ScopedMemory
Returns:
The string representation