1 | package de.uka.ipd.sdq.pipesandfilters.framework.recorder; |
2 | |
3 | import de.uka.ipd.sdq.pipesandfilters.framework.MetaDataInit; |
4 | import de.uka.ipd.sdq.pipesandfilters.framework.PipeData; |
5 | |
6 | /** |
7 | * A RawRecorder is responsible of recording the raw measurements using a |
8 | * specified WriteStrategy. No aggregations of the possibly filtered |
9 | * data are performed. |
10 | * |
11 | * @author Baum |
12 | * |
13 | */ |
14 | public class RawRecorder extends Recorder { |
15 | |
16 | /** |
17 | * The constructor for a raw data recorder. |
18 | * |
19 | * @param writeStrategy The write strategy of the recorder. |
20 | */ |
21 | public RawRecorder(IRawWriteStrategy writeStrategy) { |
22 | super(writeStrategy); |
23 | } |
24 | |
25 | /** |
26 | * This method initializes the WriteStrategy with the given meta data. |
27 | * |
28 | * @param metaData |
29 | * The meta data of the measurement. |
30 | */ |
31 | public void initialize(MetaDataInit metaData) { |
32 | writeStrategy.initialize(metaData); |
33 | } |
34 | |
35 | /** |
36 | * This method tells the WriteStrategy to flush all measurements of the |
37 | * current experiment run. |
38 | */ |
39 | public void flush() { |
40 | writeStrategy.flush(); |
41 | } |
42 | |
43 | /** |
44 | * This method forwards the raw measurement data to the specified |
45 | * WriteStrategy. |
46 | */ |
47 | public void processData(PipeData data) { |
48 | writeStrategy.writeData(data); |
49 | } |
50 | } |