Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.peripheral
Class SimulatedNorFlashSectorAllocator

    java.lang.Object
      com.sun.squawk.peripheral.SimulatedNorFlashSectorAllocator

All Implemented Interfaces:
  INorFlashSectorAllocator, IPeripheral

    public class SimulatedNorFlashSectorAllocator

extends Object
implements INorFlashSectorAllocator

Field Summary
`protected Vector` | `sectors`

Constructor Summary
`SimulatedNorFlashSectorAllocator()`

Method Summary
`INorFlashSector` | `getExtraSector(int purpose)`
`INorFlashSector[]` | `getInitialSectors(int purpose)`
`static SimulatedNorFlashSectorAllocator` | `getSingleton()`
`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
`void` | `releaseSector(INorFlashSector sector, int purpose)` Notify the allocator that a previously allocated sector is no longer required
`static void` | `resetSingleton()`
`void` | `setupSectors(int numberOfSectors, int sectorSize, int purpose, boolean useFiles)`
`void` | `uninstallSectors()` Make it such that I have no sectors allocated.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sectors

    protected Vector sectors

Constructor Detail

### SimulatedNorFlashSectorAllocator

    public SimulatedNorFlashSectorAllocator()

Method Detail

### getSingleton

    public static SimulatedNorFlashSectorAllocator getSingleton()

### resetSingleton

    public static void resetSingleton()

### getExtraSector

    public INorFlashSector getExtraSector(int purpose)
                                   throws InsufficientFlashMemoryException

  Specified by:
    `getExtraSector` in 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:
    `getInitialSectors` in 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:
    `releaseSector` in 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"