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()
           
 int getVMFlags()
           
 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)
          Is all of the specified range of physical memory present in the system? (If any of it has been removed, return false.)
 boolean isRemovable()
          If this type of memory is removable, return true.
 void onInsertion(long base, long size, AsyncEventHandler aeh)
          Arrange for the specified AEH to be called if any memory in the specified range is inserted.
 void onRemoval(long base, long size, AsyncEventHandler aeh)
          Arrange for the specified AEH 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 here
size - look for 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 here
size - look for 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 - address of the beginning of the physical memory region.
vBase - address of the beginning of the virtual memory region.
size - 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 removeable.

contains

public boolean contains(long base,
                        long size)
Does the specified range of memory contain any of this type?
Parameters:
base - physical address of the beginning of the memory region
size - 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 AEH to be called if any memory in the specified range is removed.
Parameters:
physical - base address of the beginning of the memory region
size - 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 AEH to be called if any memory in the specified range is inserted.
Parameters:
physical - base address of the beginning of the memory region
size - 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)
Is all of the specified range of physical memory present in the system? (If any of it has been removed, return false.)
Parameters:
physical - base address of the beginning of the memory region
size - 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

getVMAttributes

public int getVMAttributes()

getVMFlags

public int getVMFlags()