com.sun.squawk.peripheral
Class SimulatedNorFlashSectorAllocator
java.lang.Object
   com.sun.squawk.peripheral.SimulatedNorFlashSectorAllocator
com.sun.squawk.peripheral.SimulatedNorFlashSectorAllocator
- All Implemented Interfaces: 
- INorFlashSectorAllocator, IPeripheral
- public class SimulatedNorFlashSectorAllocator 
- extends Object- implements INorFlashSectorAllocator
 
 
 
 
sectors
protected Vector sectors
SimulatedNorFlashSectorAllocator
public SimulatedNorFlashSectorAllocator()
getSingleton
public static SimulatedNorFlashSectorAllocator getSingleton()
- 
 
- 
 
resetSingleton
public static void resetSingleton()
- 
 
- 
 
getExtraSector
public INorFlashSector getExtraSector(int purpose)
                               throws InsufficientFlashMemoryException
- 
- Specified by:
- getExtraSectorin interface- INorFlashSectorAllocator
 
- 
- Parameters:
- purpose- code (defined in- INorFlashSector) indicating purpose of sector
- Returns:
- a free sector
- Throws:
- InsufficientFlashMemoryException
 
getInitialSectors
public INorFlashSector[] getInitialSectors(int purpose)
- 
- Specified by:
- getInitialSectorsin interface- INorFlashSectorAllocator
 
- 
- Parameters:
- purpose- code (defined in- INorFlashSector) indicating purpose of sectors
- Returns:
- the sectors that were in use for this purpose at the time of the last VM exit
 
installSectors
public void installSectors(int numberOfSectors,
                           int sectorSize,
                           int purpose)
- Check to see if there are sectors already installed for the purpose
 specified, or If there are sectors found on file system use them as is,
 if not then setup with number of sectors and sectorSize as specified
 
- 
 
- 
 
releaseSector
public void releaseSector(INorFlashSector sector,
                          int purpose)
- Description copied from interface: INorFlashSectorAllocator
- Notify the allocator that a previously allocated sector is no longer required
 
- 
- Specified by:
- releaseSectorin interface- INorFlashSectorAllocator
 
- 
- Parameters:
- sector- the sector to free
- purpose- code (defined in- INorFlashSector) indicating purpose of sector
 
setupSectors
public void setupSectors(int numberOfSectors,
                         int sectorSize,
                         int purpose,
                         boolean useFiles)
- 
 
- 
 
uninstallSectors
public void uninstallSectors()
- Make it such that I have no sectors allocated.
 
- 
 
- 
 
"For updated information see the Java FRC site"