Interface BackgroundMemoryList<V,Q extends javax.measure.quantity.Quantity>
-
- Type Parameters:
V
- Value type of the measurements to be stored. Most often used values are Double or LongQ
- Quantity to be stored, seeQuantity
- All Superinterfaces:
BinaryMeasurementsList<V,Q>
,Collection<javax.measure.Measure<V,Q>>
,Iterable<javax.measure.Measure<V,Q>>
,List<javax.measure.Measure<V,Q>>
- All Known Implementing Classes:
BackgroundMemoryListImpl
public interface BackgroundMemoryList<V,Q extends javax.measure.quantity.Quantity> extends BinaryMeasurementsList<V,Q>
Interface of a @linkBinaryMeasurementsList
list, which uses a file on a drive as efficient background storage, i.e., it consumes constant main memory so that it can store huge amounts of list entries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the link to the file on background storage.void
flush()
boolean
isClosed()
Get the status of the link to the attached file.void
open()
Opens the link to the file on background storage.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
open
void open() throws IOException
Opens the link to the file on background storage. Only allowed if there is no open link.- Throws:
IOException
- Thrown if file IO fails.
-
close
void close() throws IOException
Closes the link to the file on background storage. There are no further add or get operations allowed after closing.- Throws:
IOException
-
isClosed
boolean isClosed()
Get the status of the link to the attached file. Any read or write operation is only allowed in open state.- Returns:
true
if the link to the attached file is closed.
-
flush
void flush() throws IOException
- Throws:
IOException
-
-