javax.realtime
Class LTPhysicalMemory

java.lang.Object
  extended byjavax.realtime.MemoryArea
      extended byjavax.realtime.ScopedMemory
          extended byjavax.realtime.LTPhysicalMemory

public class LTPhysicalMemory
extends ScopedMemory

A scoped memory area with a linear-time allocator that provides storage from a particular type of memory.

Since:
0.3.8
Author:
Morgan Deters

Field Summary
 
Fields inherited from class javax.realtime.ScopedMemory
joinSynchronizer
 
Fields inherited from class javax.realtime.MemoryArea
logic, parent, sizeInBytes
 
Constructor Summary
LTPhysicalMemory(Object type, long size)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, long base, long size)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, long base, long size, Runnable logic)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, long size, Runnable logic)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, long base, SizeEstimator size)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, long base, SizeEstimator size, Runnable logic)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, SizeEstimator size)
          Construct an LTPhysicalMemory.
LTPhysicalMemory(Object type, SizeEstimator size, Runnable logic)
          Construct an LTPhysicalMemory.
 
Method Summary
 String toString()
          Returns a user-friendly representation of this ScopedMemory.
 
Methods inherited from class javax.realtime.ScopedMemory
enter, enter, getMaximumSize, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, setPortal
 
Methods inherited from class javax.realtime.MemoryArea
executeInArea, finalize, getMemoryArea, guardedRun, memoryConsumed, memoryRemaining, newArray, newInstance, newInstance, size
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        long size)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
size - the requested size of the memory area
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - never thrown (but the spec requires it in the signature)

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        long base,
                        long size)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
base - the requested base physical address of the memory area
size - the requested size of the memory area
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - if the memory type and offset are in conflict
MemoryInUseException - at least some of the requested memory range is already in use

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        long base,
                        long size,
                        Runnable logic)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
base - the requested base physical address of the memory area
size - the requested size of the memory area
logic - the run() method invoked when MemoryArea.enter() is called
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - if the memory type and offset are in conflict
MemoryInUseException - at least some of the requested memory range is already in use

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        long size,
                        Runnable logic)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
size - the requested size of the memory area
logic - the run() method invoked when MemoryArea.enter() is called
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - never thrown (but the spec requires it in the signature)

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        long base,
                        SizeEstimator size)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
base - the requested base physical address of the memory area
size - the requested size of the memory area
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - if the memory type and offset are in conflict
MemoryInUseException - at least some of the requested memory range is already in use

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        long base,
                        SizeEstimator size,
                        Runnable logic)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
base - the requested base physical address of the memory area
size - the requested size of the memory area
logic - the run() method invoked when MemoryArea.enter() is called
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - if the memory type and offset are in conflict
MemoryInUseException - at least some of the requested memory range is already in use

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        SizeEstimator size)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
size - the requested size of the memory area
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - never thrown (but the spec requires it in the signature)

LTPhysicalMemory

public LTPhysicalMemory(Object type,
                        SizeEstimator size,
                        Runnable logic)
Construct an LTPhysicalMemory.

Parameters:
type - the requested type of memory
size - the requested size of the memory area
logic - the run() method invoked when MemoryArea.enter() is called
Throws:
SecurityException - if the calling execution context doesn't have permission to access this memory area
SizeOutOfBoundsException - the size is negative or extends into an invalid range of memory
UnsupportedPhysicalMemoryException - hardware doesn't support the type of memory requested
MemoryTypeConflictException - never thrown (but the spec requires it in the signature)
Method Detail

toString

public String toString()
Returns a user-friendly representation of this ScopedMemory. This String is of the form "(LTPhysicalMemory) Scoped memory # N" where N is a unique ID identifying this scoped memory area.

Please see the implementation note.

Overrides:
toString in class ScopedMemory
Returns:
the user-friendly String representation


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2006 Angelo Corsaro and Morgan Deters.