bb9fb37d915ad60841e624fcdd0f53cf87d9b6fe
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
;
22 * <b><u>ITmfEventStream</u></b>
24 * TODO: Implement me. Please.
26 public interface ITmfEventStream
{
28 public class StreamContext
{
32 public StreamContext(Object loc
, int ind
) {
37 public StreamContext(StreamContext other
) {
39 location
= other
.location
;
45 public int getNbEvents();
47 public TmfTimeRange
getTimeRange();
49 public Map
<String
, Object
> getAttributes();
52 * Positions the stream at the first event with timestamp.
55 * @return a context object for subsequent reads
57 public StreamContext
seekEvent(TmfTimestamp timestamp
);
60 * Positions the stream on the event at the wanted position.
63 * @return a context object for subsequent reads
65 public StreamContext
seekEvent(int index
);
68 * Reads and the next event on the stream and updates the context.
69 * If there is no event left, return null.
71 * @return the next event in the stream
73 public TmfEvent
getNextEvent(StreamContext context
);
75 public TmfEvent
getEvent(StreamContext context
, TmfTimestamp timestamp
);
76 public TmfEvent
getEvent(StreamContext context
, int index
);
79 * Parse the stream and creates the checkpoint structure.
80 * Normally performed once at the creation of the event stream.
82 public void indexStream(boolean waitForCompletion
);
84 public Object
getCurrentLocation();
85 public StreamContext
seekLocation(Object location
);
88 * Returns the index of the event at that timestamp
93 public int getIndex(TmfTimestamp timestamp
);
This page took 0.031957 seconds and 4 git commands to generate.