Class FileBinaryMeasurementsDaoImpl<V,Q extends javax.measure.quantity.Quantity>
java.lang.Object
org.palladiosimulator.edp2.dao.impl.Edp2DaoImpl
org.palladiosimulator.edp2.dao.impl.AbstractMeasurementsDaoImpl<V,Q>
org.palladiosimulator.edp2.repository.local.dao.FileBinaryMeasurementsDaoImpl<V,Q>
- All Implemented Interfaces:
BinaryMeasurementsDao<V,,Q> Edp2Dao,MeasurementsDao<V,Q>
public class FileBinaryMeasurementsDaoImpl<V,Q extends javax.measure.quantity.Quantity>
extends AbstractMeasurementsDaoImpl<V,Q>
implements BinaryMeasurementsDao<V,Q>
File-backed implementation of
BinaryMeasurementsDao.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the connection to the data store.voiddelete()Deletes all of the stored data.voiddeserialize(org.eclipse.net4j.util.io.ExtendedDataInputStream input) Deserialize the data from an input stream.voidflush()Write all non-persisted data to disk.javax.measure.unit.Unit<Q>getUnit()Returns the unit in which all measurements are stored.voidopen()Opens the connection to the data store and makes it's data accessible.voidserialize(org.eclipse.net4j.util.io.ExtendedDataOutputStream output) Serialize the data to an output stream.voidsetBinaryRepresentation(BackgroundMemoryListImpl.BinaryRepresentation binaryRepresentation) voidsetResourceFile(File resourceFile) Sets the resource file from which the ExperimentGroup data is loaded.voidsetSerializer(Serializer<V> serializer) voidSets the unit in which all measurements are stored.Methods inherited from class org.palladiosimulator.edp2.dao.impl.Edp2DaoImpl
canClose, canDelete, canOpen, isDeleted, isOpen, setClosed, setDeleted, setOpen
-
Field Details
-
LOGGER
Error logger for this class. -
resourceFile
Pointer to the file containing the resource.
-
-
Constructor Details
-
FileBinaryMeasurementsDaoImpl
public FileBinaryMeasurementsDaoImpl()
-
-
Method Details
-
open
Description copied from interface:Edp2DaoOpens the connection to the data store and makes it's data accessible.- Specified by:
openin interfaceEdp2Dao- Overrides:
openin classEdp2DaoImpl- Throws:
DataNotAccessibleException- Errors when initializing the data access.
-
close
Description copied from interface:Edp2DaoCloses the connection to the data store. If necessary, data is persisted before closing.- Specified by:
closein interfaceEdp2Dao- Overrides:
closein classEdp2DaoImpl- Throws:
DataNotAccessibleException- Errors when accessing data.
-
getSerializer
-
setSerializer
-
getMeasurements
- Specified by:
getMeasurementsin interfaceMeasurementsDao<V,Q extends javax.measure.quantity.Quantity> - Returns:
- Observed measurements.
-
getBinaryRepresentation
- Returns:
- the binaryRepresentation
-
setBinaryRepresentation
public void setBinaryRepresentation(BackgroundMemoryListImpl.BinaryRepresentation binaryRepresentation) - Parameters:
binaryRepresentation- the binaryRepresentation to set
-
getUnit
Description copied from interface:BinaryMeasurementsDaoReturns the unit in which all measurements are stored.- Specified by:
getUnitin interfaceBinaryMeasurementsDao<V,Q extends javax.measure.quantity.Quantity> - Returns:
- the unit
-
setUnit
Description copied from interface:BinaryMeasurementsDaoSets the unit in which all measurements are stored.- Specified by:
setUnitin interfaceBinaryMeasurementsDao<V,Q extends javax.measure.quantity.Quantity> - Parameters:
unit- the unit to set
-
serialize
public void serialize(org.eclipse.net4j.util.io.ExtendedDataOutputStream output) throws DataNotAccessibleException Description copied from interface:MeasurementsDaoSerialize the data to an output stream. Used to transfer Measurements to and from remote locations.- Specified by:
serializein interfaceMeasurementsDao<V,Q extends javax.measure.quantity.Quantity> - Parameters:
output- Output data stream- Throws:
DataNotAccessibleException
-
deserialize
public void deserialize(org.eclipse.net4j.util.io.ExtendedDataInputStream input) throws DataNotAccessibleException Description copied from interface:MeasurementsDaoDeserialize the data from an input stream. Used to transfer Measurements to and from remote locations.- Specified by:
deserializein interfaceMeasurementsDao<V,Q extends javax.measure.quantity.Quantity> - Parameters:
input- Input data stream.- Throws:
DataNotAccessibleException
-
flush
public void flush()Description copied from interface:Edp2DaoWrite all non-persisted data to disk. -
setResourceFile
Sets the resource file from which the ExperimentGroup data is loaded. Can only be set once.- Parameters:
resourceFile- File in which the ExperimentGroup is stored.
-
delete
Description copied from interface:Edp2DaoDeletes all of the stored data.- Specified by:
deletein interfaceEdp2Dao- Overrides:
deletein classEdp2DaoImpl- Throws:
DataNotAccessibleException- Errors when accessing data.
-