aicas logoJamaica 6.1 release 1

javax.realtime
Interface PhysicalMemoryTypeFilter


public interface PhysicalMemoryTypeFilter

Jamaica Real-Time Specification for Java class PhysicalMemoryTypeFilter.

Through implementations of this class, additional memory classes could be provided. These classes are supposed to be used by PhysicalMemoryTypeFilter only, not by application code directly.


Method Summary
 boolean contains(long base, long size)
          contains tests if the specified memory range contains memory of this memory type.
 long find(long base, long size)
          find searches for physical memory of this type in the given range.
 int getVMAttributes()
          getVMAttributes returns the virtual memory attributes of this memory type.
 int getVMFlags()
          getVMFlags returns the virtual memory flags of this memory type.
 void initialize(long base, long vBase, long size)
          initialize performs the required initialization if initialization is required for the given memory range to correspond to the type of this (i.e., set the virtual memory protection mode).
 boolean isPresent(long base, long size)
          isPresent checks if the specified range of memory currently exists (i.e., it has not been removed).
 boolean isRemovable()
          isRemovable is true if the memory of this type is removable.
 void onInsertion(long base, long size, AsyncEvent ae)
          onInsertion associates the given AsyncEvent with the insertion event of the specified memory range.
 void onInsertion(long base, long size, AsyncEventHandler aeh)
          Deprecated. RTSJ V1.0.1 Use onInsertion(long,long,AsyncEvent) instead.
 void onRemoval(long base, long size, AsyncEvent ae)
          onRemoval associates the given AsyncEvent with the removal event of the specified memory range.
 void onRemoval(long base, long size, AsyncEventHandler aeh)
          Deprecated. RTSJ V1.0.1 Use onInsertion(long,long,AsyncEvent) instead.
 boolean unregisterInsertionEvent(long base, long size, AsyncEvent ae)
          unregisterInsertionEvent removes the association events added by onInsertion(long,long,AsyncEvent).
 void unregisterRemovalEvent(long base, long size, AsyncEvent ae)
          unregisterRemovalEvent removes the association events added by onRemoval(long,long,AsyncEvent).
 long vFind(long base, long size)
          vFind searches for virtual memory of this type in the given range.
 

Method Detail

find

long find(long base,
          long size)
find searches for physical memory of this type in the given range.

Parameters:
base - the base address of the range.
size - the size of the range.
Returns:
the address of the memory range or -1 if none was found.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

vFind

long vFind(long base,
           long size)
vFind searches for virtual memory of this type in the given range.

Parameters:
base - the base address of the range.
size - the size of the range.
Returns:
the address of the memory range or -1 if none was found.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

initialize

void initialize(long base,
                long vBase,
                long size)
initialize performs the required initialization if initialization is required for the given memory range to correspond to the type of this (i.e., set the virtual memory protection mode).

Parameters:
base - the base address of the range.
vBase - the base address of the virtual memory region.
size - the size of the range.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

isRemovable

boolean isRemovable()
isRemovable is true if the memory of this type is removable.

Returns:
true iff the memory of this type is removable.

contains

boolean contains(long base,
                 long size)
contains tests if the specified memory range contains memory of this memory type.

Parameters:
base - the base address of the range.
size - the size of the range.
Returns:
true if the specified range contains any memory of this type.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

onRemoval

void onRemoval(long base,
               long size,
               AsyncEventHandler aeh)
Deprecated. RTSJ V1.0.1 Use onInsertion(long,long,AsyncEvent) instead.

onRemoval associates the given AsyncEventHandler with the removal event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
aeh - the AsyncEventHandler to be fired on an insertion event.
Throws:
IllegalArgumentException - iff size is negative or the specified memory range is not removable or aeh is null.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

onInsertion

void onInsertion(long base,
                 long size,
                 AsyncEventHandler aeh)
Deprecated. RTSJ V1.0.1 Use onInsertion(long,long,AsyncEvent) instead.

onInsertion associates the given AsyncEventHandler with the insertion event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
aeh - the AsyncEventHandler to be fired on an insertion event.
Throws:
IllegalArgumentException - iff size is negative or the specified memory range is not removable or aeh is null.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

onRemoval

void onRemoval(long base,
               long size,
               AsyncEvent ae)
onRemoval associates the given AsyncEvent with the removal event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
ae - the AsyncEventHandler to be fired on an insertion event.
Throws:
IllegalArgumentException - iff size is negative or the specified memory range is not removable or ae is null.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.
Since:
RTSJ V1.0.1

onInsertion

void onInsertion(long base,
                 long size,
                 AsyncEvent ae)
onInsertion associates the given AsyncEvent with the insertion event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
ae - the AsyncEventHandler to be fired on an insertion event.
Throws:
IllegalArgumentException - iff size is negative or specified memory range is not removable or ae is null.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.
Since:
RTSJ V1.0.1

unregisterInsertionEvent

boolean unregisterInsertionEvent(long base,
                                 long size,
                                 AsyncEvent ae)
unregisterInsertionEvent removes the association events added by onInsertion(long,long,AsyncEvent).

Parameters:
base - the base address of the range.
size - the size of the range.
ae - the AsyncEvent to be fired on an insertion event. May be null to remove all AsyncEvents registered for the given range.
Returns:
true iff at least one AsyncEventHandler was removed.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.
Since:
RTSJ V1.0.1

unregisterRemovalEvent

void unregisterRemovalEvent(long base,
                            long size,
                            AsyncEvent ae)
unregisterRemovalEvent removes the association events added by onRemoval(long,long,AsyncEvent).

Parameters:
base - the base address of the range.
size - the size of the range.
ae - the AsyncEvent to be fired on an insertion event. May be null to remove all AsyncEvents registered for the given range.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.
Since:
RTSJ V1.0.1

isPresent

boolean isPresent(long base,
                  long size)
isPresent checks if the specified range of memory currently exists (i.e., it has not been removed).

Parameters:
base - the base address of the range.
size - the size of the range.
Returns:
true if the specified range is currently present.
Throws:
IllegalArgumentException - iff size is negative.
SizeOutOfBoundsException - iff base plus size is greater than the physical memory range of the processor.
OffsetOutOfBoundsException - iff base is negative.

getVMAttributes

int getVMAttributes()
getVMAttributes returns the virtual memory attributes of this memory type. The returned value equals the POSIX mmap function's prot parameter, i.e., PROT_READ, PROT_WRITE; PROT_EXEC or PROT_NONE.

Returns:
the virtual memory attribute of this type.

getVMFlags

int getVMFlags()
getVMFlags returns the virtual memory flags of this memory type. The returned value equals the POSIX mmap function's flags parameter, i.e., MAP_SHARED, MAP_PRIVATE or MAP_FIXED.

Returns:
the virtual memory flags of this type.

aicas logoJamaica 6.1 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2012 aicas GmbH. All Rights Reserved.