1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.stream
;
17 import org
.eclipse
.linuxtools
.tmf
.event
.TmfEvent
;
18 import org
.eclipse
.linuxtools
.tmf
.event
.TmfTimeRange
;
19 import org
.eclipse
.linuxtools
.tmf
.event
.TmfTimestamp
;
20 import org
.eclipse
.linuxtools
.tmf
.trace
.TmfTrace
;
23 * <b><u>ITmfEventStream</u></b>
25 * TODO: Implement me. Please.
27 public interface ITmfEventStream
{
29 public class StreamContext
{
31 public StreamContext(Object loc
) {
36 public int getNbEvents();
38 public TmfTimeRange
getTimeRange();
40 public Map
<String
, Object
> getAttributes();
43 * Positions the stream at the first event with timestamp.
46 * @return a context object for subsequent reads
48 public StreamContext
seekEvent(TmfTimestamp timestamp
);
51 * Positions the stream on the event at the wanted position.
54 * @return a context object for subsequent reads
56 public StreamContext
seekEvent(int index
);
59 * Reads and the next event on the stream and updates the context.
60 * If there is no event left, return null.
62 * @return the next event in the stream
64 public TmfEvent
getNextEvent(StreamContext context
);
66 public TmfEvent
getEvent(StreamContext context
, TmfTimestamp timestamp
);
67 public TmfEvent
getEvent(StreamContext context
, int index
);
70 * Parse the stream and creates the checkpoint structure.
71 * Normally performed once at the creation of the event stream.
73 public void indexStream(boolean waitForCompletion
);
75 public Object
getCurrentLocation();
76 public StreamContext
seekLocation(Object location
);
78 public void addListener(TmfTrace tmfEventLog
);
79 public void removeListener(TmfTrace tmfEventLog
);
This page took 0.038081 seconds and 5 git commands to generate.