appl.data
Interface LateLoadable

All Known Subinterfaces:
ReadableGrid, WritableGrid
All Known Implementing Classes:
AbstractReadableGrid, AbstractWritableGrid, ReadableGridCoverage, WritableGridArray, WritableGridArray.Double, WritableGridArray.Float, WritableGridArray.Integer, WritableGridCoverage, WritableGridRaster

public interface LateLoadable

Defines the base functionality of late loading. Late loading means that the data is loaded into memory only when it is accessed (for example by getRasterSample(..)-Methods when implemented for WritableGrids). Notice that this class can be used with any datatype (not only grids).

Author:
Dominik Appl

Method Summary
 boolean isLateLoadable()
          Answers if the data type supports late loading
 void loadData()
          Loads the Data into the memory if this function supported.
 void unloadData()
          Unloads the Data onto disk or into nirvana, depending on implementation.
 

Method Detail

isLateLoadable

boolean isLateLoadable()
Answers if the data type supports late loading

Returns:
true, if late loading is supported

loadData

void loadData()
              throws LoadingException
Loads the Data into the memory if this function supported. Else it should be already loaded

Throws:
LoadingException - if the loading fails

unloadData

void unloadData()
Unloads the Data onto disk or into nirvana, depending on implementation. Or does nothing, if late loading is not supported. NOTICE: UNLOADING DOES NOT MEAN, THAT DATA IS WRITTEN BACK TO THE SOURCE. It may be stored in a temporary file for later loading/export, depending on implementation.