public final class MultiStore extends Object implements MeasurementStore
Constructor and Description |
---|
MultiStore(MeasurementStore... stores) |
Modifier and Type | Method and Description |
---|---|
long |
alocateMeasurements(MeasurementsInfo measurement,
int sampleTimeMillis)
Make any allocations necessary for the following measurements.
|
void |
close() |
void |
flush()
flush all data that might be buffered by this store.
|
List<MeasurementStore> |
getStores() |
void |
saveMeasurements(long tableId,
long timeStampMillis,
long... measurements)
Save measurements.
|
String |
toString() |
public MultiStore(MeasurementStore... stores)
public long alocateMeasurements(MeasurementsInfo measurement, int sampleTimeMillis) throws IOException
MeasurementStore
alocateMeasurements
in interface MeasurementStore
measurement
- - the information about the measurement(s)sampleTimeMillis
- - the expected sample time. (interval between the stored measurements).IOException
- - IO issues.public void saveMeasurements(long tableId, long timeStampMillis, long... measurements) throws IOException
MeasurementStore
saveMeasurements
in interface MeasurementStore
tableId
- - the table ID to store measurements for.timeStampMillis
- - the timestamp of the measurement (millis since Jan 1 1970 UTC)measurements
- - the measurements to persist. (same order as declared)IOException
- - IO issues.public void flush() throws IOException
MeasurementStore
flush
in interface MeasurementStore
IOException
- - IO issues.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public List<MeasurementStore> getStores()
Copyright © 2018 SPF4J. All rights reserved.