com.sun.rtsjx
Class CoreRawMemoryType

java.lang.Object
  extended by com.sun.rtsjx.CoreRawMemoryType
All Implemented Interfaces:
javax.realtime.PhysicalMemoryTypeFilter
Direct Known Subclasses:
SharedMemoryMapper

public class CoreRawMemoryType
extends java.lang.Object
implements javax.realtime.PhysicalMemoryTypeFilter

Internal class that provides VM dependent information for physical memory managment.


Constructor Summary
CoreRawMemoryType()
          Default constructor without a base and a size.
CoreRawMemoryType(long base, long size)
          Constructor specifying base and size.
CoreRawMemoryType(java.lang.Object[] param)
          Constructor specifying base and size.
 
Method Summary
 void addConstraints(PhysicalMemoryRequest request)
          Add new constraints to a physical memory request.
 void checkConstraints(PhysicalMemoryRequest request)
          Check consistency with other constraints.
 boolean contains(long base, long size)
           
 long find(long base, long size)
           
 int getVMAttributes()
           
 int getVMFlags()
           
 void initialize(long base, long vBase, long size)
           
 boolean isPresent(long base, long size)
           
 boolean isRemovable()
           
 void onInsertion(long base, long size, javax.realtime.AsyncEvent ae)
           
 void onInsertion(long base, long size, javax.realtime.AsyncEventHandler aeh)
           
 void onRemoval(long base, long size, javax.realtime.AsyncEvent ae)
           
 void onRemoval(long base, long size, javax.realtime.AsyncEventHandler aeh)
           
 boolean unregisterInsertionEvent(long base, long size, javax.realtime.AsyncEvent ae)
           
 boolean unregisterRemovalEvent(long base, long size, javax.realtime.AsyncEvent ae)
           
 long vFind(long base, long size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreRawMemoryType

public CoreRawMemoryType()
Default constructor without a base and a size.


CoreRawMemoryType

public CoreRawMemoryType(long base,
                         long size)
Constructor specifying base and size.

Parameters:
base - base address
size - size in bytes

CoreRawMemoryType

public CoreRawMemoryType(java.lang.Object[] param)
Constructor specifying base and size.

Parameters:
param - array containing two Long, the base at index 0 and the size at index 1.
Method Detail

find

public long find(long base,
                 long size)
Specified by:
find in interface javax.realtime.PhysicalMemoryTypeFilter

vFind

public long vFind(long base,
                  long size)
Specified by:
vFind in interface javax.realtime.PhysicalMemoryTypeFilter

initialize

public void initialize(long base,
                       long vBase,
                       long size)
Specified by:
initialize in interface javax.realtime.PhysicalMemoryTypeFilter

isRemovable

public boolean isRemovable()
Specified by:
isRemovable in interface javax.realtime.PhysicalMemoryTypeFilter

contains

public boolean contains(long base,
                        long size)
Specified by:
contains in interface javax.realtime.PhysicalMemoryTypeFilter

onRemoval

public void onRemoval(long base,
                      long size,
                      javax.realtime.AsyncEventHandler aeh)
Specified by:
onRemoval in interface javax.realtime.PhysicalMemoryTypeFilter

onRemoval

public void onRemoval(long base,
                      long size,
                      javax.realtime.AsyncEvent ae)
Specified by:
onRemoval in interface javax.realtime.PhysicalMemoryTypeFilter

onInsertion

public void onInsertion(long base,
                        long size,
                        javax.realtime.AsyncEventHandler aeh)
Specified by:
onInsertion in interface javax.realtime.PhysicalMemoryTypeFilter

onInsertion

public void onInsertion(long base,
                        long size,
                        javax.realtime.AsyncEvent ae)
Specified by:
onInsertion in interface javax.realtime.PhysicalMemoryTypeFilter

isPresent

public boolean isPresent(long base,
                         long size)
Specified by:
isPresent in interface javax.realtime.PhysicalMemoryTypeFilter

getVMAttributes

public int getVMAttributes()
Specified by:
getVMAttributes in interface javax.realtime.PhysicalMemoryTypeFilter

getVMFlags

public int getVMFlags()
Specified by:
getVMFlags in interface javax.realtime.PhysicalMemoryTypeFilter

unregisterInsertionEvent

public boolean unregisterInsertionEvent(long base,
                                        long size,
                                        javax.realtime.AsyncEvent ae)
Specified by:
unregisterInsertionEvent in interface javax.realtime.PhysicalMemoryTypeFilter

unregisterRemovalEvent

public boolean unregisterRemovalEvent(long base,
                                      long size,
                                      javax.realtime.AsyncEvent ae)
Specified by:
unregisterRemovalEvent in interface javax.realtime.PhysicalMemoryTypeFilter

addConstraints

public void addConstraints(PhysicalMemoryRequest request)
                    throws java.lang.SecurityException,
                           javax.realtime.OffsetOutOfBoundsException,
                           javax.realtime.SizeOutOfBoundsException,
                           javax.realtime.UnsupportedPhysicalMemoryException,
                           javax.realtime.MemoryTypeConflictException,
                           java.lang.OutOfMemoryError
Add new constraints to a physical memory request.

Parameters:
request - null or PhysicalMemoryRequest containing the previously parsed constraints.
Throws:
java.lang.SecurityException - Thrown if application doesn't have permissions to access physical memory, the specified range of addresses, or the given type of memory.
javax.realtime.OffsetOutOfBoundsException - Thrown if the address is invalid.
javax.realtime.SizeOutOfBoundsException - Thrown if the size is negative or extends into an invalid range of memory.
javax.realtime.UnsupportedPhysicalMemoryException - Thrown if the underlying hardware does not support the given type, or if no matching PhysicalMemoryTypeFilter has been registered with the PhysicalMemoryManager.
javax.realtime.MemoryTypeConflictException - Thrown if the specified base does not point to memory that matches the request type, or if type specifies incompatible memory attributes.
java.lang.OutOfMemoryError - Thrown if the requested type of memory exists, but there is not enough of it free to satisfy the request.
See Also:
PhysicalMemoryRequest

checkConstraints

public void checkConstraints(PhysicalMemoryRequest request)
                      throws java.lang.SecurityException,
                             javax.realtime.OffsetOutOfBoundsException,
                             javax.realtime.SizeOutOfBoundsException,
                             javax.realtime.MemoryTypeConflictException,
                             java.lang.OutOfMemoryError
Check consistency with other constraints.

Parameters:
request - null or PhysicalMemoryRequest containing the previously parsed constraints.
Throws:
java.lang.SecurityException - Thrown if application doesn't have permissions to access physical memory, the specified range of addresses, or the given type of memory.
javax.realtime.OffsetOutOfBoundsException - Thrown if the address is invalid.
javax.realtime.SizeOutOfBoundsException - Thrown if the size is negative or extends into an invalid range of memory.
javax.realtime.MemoryTypeConflictException - Thrown if the specified base does not point to memory that matches the request type, or if type specifies incompatible memory attributes.
java.lang.OutOfMemoryError - Thrown if the requested type of memory exists, but there is not enough of it free to satisfy the request.
See Also:
PhysicalMemoryRequest