javax.realtime
Interface PhysicalMemoryTypeFilter


public interface PhysicalMemoryTypeFilter


Method Summary
 boolean contains(long base, long size)
          Does the specified range of memory contain any of this type?
 long find(long base, long size)
          Search for memory of the right type.
 int getVMAttributes()
          Return the virtual memory attributes of this type of memory.
 int getVMFlags()
          Return the virtual memory flags of this type of memory.
 void initialize(long base, long vBase, long size)
          If configuration is required for memory to fit the attribute of this object, do the configuration here.
 boolean isPresent(long base, long size)
          Checks if all of the specified range of physical memory present in the system.
 boolean isRemovable()
          If this type of memory is removable, return true.
 void onInsertion(long base, long size, AsyncEventHandler aeh)
          Arrange for the specified AsyncEventHandler to be called if any memory in the specified range is inserted.
 void onRemoval(long base, long size, AsyncEventHandler aeh)
          Arrange for the specified AsyncEventHandler to be called if any memory in the specified range is removed.
 long vFind(long base, long size)
          Search for virtual memory of the right type.
 

Method Detail

find

public long find(long base,
                 long size)
Search for memory of the right type.
Parameters:
base - Start searching at this address.
size - Find at least this much memory.
Returns:
The address where memory was found or -1 if it was not found.

vFind

public long vFind(long base,
                  long size)
Search for virtual memory of the right type. This is important for systems where attributes are associated with particular ranges of virtual memory.
Parameters:
base - Start searching at this address.
size - Find at least this much memory.
Returns:
The address where memory was found or -1 if it was not found.

initialize

public void initialize(long base,
                       long vBase,
                       long size)
If configuration is required for memory to fit the attribute of this object, do the configuration here.
Parameters:
base - The address of the beginning of the physical memory region.
vBase - The address of the beginning of the virtual memory region.
size - The size of the memory region.
Throws:
java.lang.IllegalArgumentException - if the base and size do not fall into this type of memory

isRemovable

public boolean isRemovable()
If this type of memory is removable, return true.
Returns:
true if this type of memory is removable.

contains

public boolean contains(long base,
                        long size)
Does the specified range of memory contain any of this type?
Parameters:
base - The physical address of the beginning of the memory region.
size - The size of the memory region.
Returns:
true If the specified range contains any of this type of memory.

onRemoval

public void onRemoval(long base,
                      long size,
                      AsyncEventHandler aeh)
Arrange for the specified AsyncEventHandler to be called if any memory in the specified range is removed.
Parameters:
base - The physical address of the beginning of the memory region.
size - The size of the memory region.
aeh - Run this if any memory in the specified range is removed.
Throws:
java.lang.IllegalArgumentException - if the base and size do not fall into this type of memory

onInsertion

public void onInsertion(long base,
                        long size,
                        AsyncEventHandler aeh)
Arrange for the specified AsyncEventHandler to be called if any memory in the specified range is inserted.
Parameters:
base - The physical address of the beginning of the memory region.
size - The size of the memory region.
aeh - Run this if any memory in the specified range is inserted.
Throws:
java.lang.IllegalArgumentException - if the base and size do not fall into this type of memory

isPresent

public boolean isPresent(long base,
                         long size)
Checks if all of the specified range of physical memory present in the system. If any of it has been removed, false is returned.
Parameters:
base - The physical address of the beginning of the memory region.
size - The size of the memory region.
Throws:
java.lang.IllegalArgumentException - if the base and size do not fall into this type of memory

getVMAttributes

public int getVMAttributes()
Return the virtual memory attributes of this type of memory.

getVMFlags

public int getVMFlags()
Return the virtual memory flags of this type of memory.