SunSPOT API V3.0


com.sun.spot.flashmanagement
Class NorFlashSectorAllocator

java.lang.Object
  extended by com.sun.spot.flashmanagement.NorFlashSectorAllocator
All Implemented Interfaces:
INorFlashSectorAllocator, IPeripheral

public class NorFlashSectorAllocator
extends Object
implements INorFlashSectorAllocator

See Also:
INorFlashSectorAllocator

Constructor Summary
NorFlashSectorAllocator()
           
 
Method Summary
 INorFlashSector getExtraSector(int purpose)
           
 INorFlashSector[] getInitialSectors(int purpose)
           
 void releaseSector(INorFlashSector sector, int purpose)
          Notify the allocator that a previously allocated sector is no longer required
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NorFlashSectorAllocator

public NorFlashSectorAllocator()
Method Detail

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
See Also:
INorFlashSectorAllocator.getExtraSector(int)

getInitialSectors

public INorFlashSector[] getInitialSectors(int purpose)
                                    throws IOException
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
Throws:
InsufficientFlashMemoryException
IOException
See Also:
INorFlashSectorAllocator.getInitialSectors(int)

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
See Also:
INorFlashSectorAllocator.releaseSector(com.sun.squawk.peripheral.INorFlashSector, int)

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.