Next Previous Up Contents
Next: Default Policy
Up: Storage Policies
Previous: Storage Policies

4.1 Available Policies

The storage policies currently supplied as static members of the StoragePolicy class are as follows:

PREFER_MEMORY
Stores table data in memory. Currently implemented using an ArrayList of Object[] arrays.
PREFER_DISK
Generally attempts to store data in a temporary disk file, though in the case that this is impossible (e.g. SecurityException) will fall back to memory-based storage. May also use memory for rather small tables. The temporary disk file is written to the default temporary directory, and will be deleted when the RowStore is garbage collected, or on normal termination of the JVM. This is currently implemented using mapped file access and row-oriented storage of data.
DISCARD
Metadata is retained, but the rows are simply thrown away. The table returned from the row store has a row count of zero.

A policy which uses column-oriented disk-based storage may be forthcoming in the future; this would have different performance characteristics to the row-oriented one.

You are quite at liberty to implement and use your own StoragePolicy objects, possibly on top of existing ones. For instance you could implement one which stored only the first ten rows of any array.


Next Previous Up Contents
Next: Default Policy
Up: Storage Policies
Previous: Storage Policies

STIL - Starlink Tables Infrastructure Library
Starlink User Note 252
STIL web page: http://www.starlink.ac.uk/stil/
Author email: m.b.taylor@bristol.ac.uk
Starlink: http://www.starlink.ac.uk/