Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Montplaisir2014-05-21 21:11:13 +0000
committerAlexandre Montplaisir2014-05-22 13:44:39 +0000
commit1f3fdcdd4d44dd2b5025a57a567b4fdbcc9449dc (patch)
tree81615664cca2f8aa1e696577d0d4151172a14c05
parentf3c44320bc7feac3fb73bc10b522431eb6a30cb3 (diff)
downloadorg.eclipse.linuxtools-1f3fdcdd4d44dd2b5025a57a567b4fdbcc9449dc.tar.gz
org.eclipse.linuxtools-1f3fdcdd4d44dd2b5025a57a567b4fdbcc9449dc.tar.xz
org.eclipse.linuxtools-1f3fdcdd4d44dd2b5025a57a567b4fdbcc9449dc.zip
ctf: Rename Stream* classes to CTFStream*
"Stream" will become very confusing with java.util.stream.Stream when Java 8 comes. Rename those classes to CTFStream, for better namespacing. Change-Id: Ifb239af0366553472463c50d8e6ed899e002f880 Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Reviewed-on: https://git.eclipse.org/r/27067 Tested-by: Hudson CI Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputPacketIndexEntryTest.java (renamed from lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexEntryTest.java)2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputPacketIndexTest.java (renamed from lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java)2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputReaderTest.java (renamed from lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java)30
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputReaderTimestampComparatorTest.java (renamed from lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java)2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputTest.java (renamed from lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java)28
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamTest.java (renamed from lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java)18
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/MetadataTest.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/TestAll.java12
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java12
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java9
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/IEventDeclaration.java12
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java)12
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInput.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java)20
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java)21
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputReader.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java)28
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java34
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java45
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/EventDeclaration.java12
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java12
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java8
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/relayd/LttngRelaydConsumer.java8
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ctf.core/src/org/eclipse/linuxtools/tmf/ctf/core/CtfIterator.java4
23 files changed, 160 insertions, 183 deletions
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexEntryTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputPacketIndexEntryTest.java
index 07a1b44018..9ec59d0d65 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexEntryTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputPacketIndexEntryTest.java
@@ -25,7 +25,7 @@ import org.junit.Test;
* @author ematkho
* @version $Revision: 1.0 $
*/
-public class StreamInputPacketIndexEntryTest {
+public class CTFStreamInputPacketIndexEntryTest {
private StreamInputPacketIndexEntry fixture;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputPacketIndexTest.java
index c603811cba..a9aef8bf93 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputPacketIndexTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
* @version $Revision: 1.0 $
*/
@SuppressWarnings("javadoc")
-public class StreamInputPacketIndexTest {
+public class CTFStreamInputPacketIndexTest {
private StreamInputPacketIndex fixture;
private StreamInputPacketIndexEntry entry;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputReaderTest.java
index 82e78514c0..ab9a89a891 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputReaderTest.java
@@ -28,9 +28,9 @@ import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFResponse;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInput;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInputReader;
import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
import org.junit.Before;
import org.junit.Test;
@@ -39,17 +39,17 @@ import com.google.common.collect.ImmutableList;
/**
* The class <code>StreamInputReaderTest</code> contains tests for the class
- * <code>{@link StreamInputReader}</code>.
+ * <code>{@link CTFStreamInputReader}</code>.
*
* @author ematkho
* @version $Revision: 1.0 $
*/
@SuppressWarnings("javadoc")
-public class StreamInputReaderTest {
+public class CTFStreamInputReaderTest {
private static final CtfTestTrace testTrace = CtfTestTrace.KERNEL;
- private StreamInputReader fixture;
+ private CTFStreamInputReader fixture;
private static ImmutableList<String> wrap(String s) {
return ImmutableList.<String> builder().add(s).build();
@@ -76,19 +76,19 @@ public class StreamInputReaderTest {
);
}
- private static StreamInputReader getStreamInputReader() throws CTFReaderException {
+ private static CTFStreamInputReader getStreamInputReader() throws CTFReaderException {
assumeTrue(testTrace.exists());
CTFTrace trace = testTrace.getTrace();
- Stream s = trace.getStream((long) 0);
- Set<StreamInput> streamInput = s.getStreamInputs();
- StreamInputReader retVal = null;
- for (StreamInput si : streamInput) {
+ CTFStream s = trace.getStream((long) 0);
+ Set<CTFStreamInput> streamInput = s.getStreamInputs();
+ CTFStreamInputReader retVal = null;
+ for (CTFStreamInput si : streamInput) {
/*
* For the tests, we'll use the stream input corresponding to the
* CPU 0
*/
if (si.getFilename().endsWith("0_0")) {
- retVal = new StreamInputReader(si);
+ retVal = new CTFStreamInputReader(si);
break;
}
}
@@ -112,10 +112,10 @@ public class StreamInputReaderTest {
*/
@Test(expected = CTFReaderException.class)
public void testStreamInputReader_invalid() throws CTFReaderException {
- StreamInput streamInput = new StreamInput(
- new Stream(new CTFTrace("")), new File(""));
+ CTFStreamInput streamInput = new CTFStreamInput(
+ new CTFStream(new CTFTrace("")), new File(""));
- StreamInputReader result = new StreamInputReader(streamInput);
+ CTFStreamInputReader result = new CTFStreamInputReader(streamInput);
assertNotNull(result);
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputReaderTimestampComparatorTest.java
index 04f7ab9bdb..84ecfb4e0f 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputReaderTimestampComparatorTest.java
@@ -24,7 +24,7 @@ import org.junit.Test;
* @author ematkho
* @version $Revision: 1.0 $
*/
-public class StreamInputReaderTimestampComparatorTest {
+public class CTFStreamInputReaderTimestampComparatorTest {
private StreamInputReaderTimestampComparator fixture;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputTest.java
index 472ef02068..0e1e80d74b 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamInputTest.java
@@ -24,24 +24,24 @@ import java.io.FilenameFilter;
import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInput;
import org.junit.Before;
import org.junit.Test;
/**
* The class <code>StreamInputTest</code> contains tests for the class
- * <code>{@link StreamInput}</code>.
+ * <code>{@link CTFStreamInput}</code>.
*
* @author ematkho
* @version $Revision: 1.0 $
*/
@SuppressWarnings("javadoc")
-public class StreamInputTest {
+public class CTFStreamInputTest {
private static final CtfTestTrace testTrace = CtfTestTrace.KERNEL;
- private StreamInput fixture;
+ private CTFStreamInput fixture;
/**
* Perform pre-test initialization.
@@ -51,7 +51,7 @@ public class StreamInputTest {
@Before
public void setUp() throws CTFReaderException {
assumeTrue(testTrace.exists());
- fixture = new StreamInput(new Stream(testTrace.getTrace()), createFile());
+ fixture = new CTFStreamInput(new CTFStream(testTrace.getTrace()), createFile());
fixture.setTimestampEnd(1L);
}
@@ -99,7 +99,7 @@ public class StreamInputTest {
*/
@Test
public void testGetStream() {
- Stream result = fixture.getStream();
+ CTFStream result = fixture.getStream();
assertNotNull(result);
}
@@ -130,19 +130,19 @@ public class StreamInputTest {
assertEquals(fixture.getTimestampEnd(), 1L);
}
- StreamInput s1;
- StreamInput s2;
+ CTFStreamInput s1;
+ CTFStreamInput s2;
@Test
public void testEquals1() throws CTFReaderException {
- s1 = new StreamInput(new Stream(testTrace.getTrace()),
+ s1 = new CTFStreamInput(new CTFStream(testTrace.getTrace()),
createFile());
assertFalse(s1.equals(null));
}
@Test
public void testEquals2() throws CTFReaderException {
- s1 = new StreamInput(new Stream(testTrace.getTrace()),
+ s1 = new CTFStreamInput(new CTFStream(testTrace.getTrace()),
createFile());
assertFalse(s1.equals(new Long(23L)));
@@ -150,7 +150,7 @@ public class StreamInputTest {
@Test
public void testEquals3() throws CTFReaderException {
- s1 = new StreamInput(new Stream(testTrace.getTrace()),
+ s1 = new CTFStreamInput(new CTFStream(testTrace.getTrace()),
createFile());
assertEquals(s1, s1);
@@ -158,9 +158,9 @@ public class StreamInputTest {
@Test
public void testEquals4() throws CTFReaderException {
- s1 = new StreamInput(new Stream(testTrace.getTrace()),
+ s1 = new CTFStreamInput(new CTFStream(testTrace.getTrace()),
createFile());
- s2 = new StreamInput(new Stream(testTrace.getTrace()),
+ s2 = new CTFStreamInput(new CTFStream(testTrace.getTrace()),
createFile());
assertEquals(s1, s2);
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamTest.java
index 68fe8a81f9..5b9abeda38 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamTest.java
@@ -25,8 +25,8 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInput;
import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
import org.junit.Before;
@@ -34,17 +34,17 @@ import org.junit.Test;
/**
* The class <code>StreamTest</code> contains tests for the class
- * <code>{@link Stream}</code>.
+ * <code>{@link CTFStream}</code>.
*
* @author ematkho
* @version $Revision: 1.0 $
*/
@SuppressWarnings("javadoc")
-public class StreamTest {
+public class CTFStreamTest {
private static final CtfTestTrace testTrace = CtfTestTrace.KERNEL;
- private Stream fixture;
+ private CTFStream fixture;
/**
* Perform pre-test initialization.
@@ -54,12 +54,12 @@ public class StreamTest {
@Before
public void setUp() throws CTFReaderException {
assumeTrue(testTrace.exists());
- fixture = new Stream(testTrace.getTrace());
+ fixture = new CTFStream(testTrace.getTrace());
fixture.setEventContext(new StructDeclaration(1L));
fixture.setPacketContext(new StructDeclaration(1L));
fixture.setEventHeader(new StructDeclaration(1L));
fixture.setId(1L);
- fixture.addInput(new StreamInput(new Stream(testTrace.getTrace()), createFile()));
+ fixture.addInput(new CTFStreamInput(new CTFStream(testTrace.getTrace()), createFile()));
}
private static File createFile() {
@@ -83,7 +83,7 @@ public class StreamTest {
@Test
public void testStream() throws CTFReaderException {
CTFTrace trace = testTrace.getTrace();
- Stream result = new Stream(trace);
+ CTFStream result = new CTFStream(trace);
assertNotNull(result);
}
@@ -170,7 +170,7 @@ public class StreamTest {
*/
@Test
public void testGetStreamInputs() {
- Set<StreamInput> result = fixture.getStreamInputs();
+ Set<CTFStreamInput> result = fixture.getStreamInputs();
assertNotNull(result);
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
index 7d12edf7f0..3eb60d2779 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
@@ -31,7 +31,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
import org.junit.Before;
import org.junit.Test;
@@ -113,7 +113,7 @@ public class CTFTraceTest {
// Add a stream
try {
- Stream stream = new Stream(testTrace.getTrace());
+ CTFStream stream = new CTFStream(testTrace.getTrace());
stream.setId(1234);
fixture.addStream(stream);
} catch (CTFReaderException e) {
@@ -187,7 +187,7 @@ public class CTFTraceTest {
@Test
public void testGetStream() {
Long id = new Long(0L);
- Stream result = fixture.getStream(id);
+ CTFStream result = fixture.getStream(id);
assertNotNull(result);
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/MetadataTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/MetadataTest.java
index 45a712c920..105adb7850 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/MetadataTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/MetadataTest.java
@@ -24,7 +24,7 @@ import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
import org.eclipse.linuxtools.ctf.core.trace.Metadata;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
import org.junit.Before;
import org.junit.Test;
@@ -188,12 +188,12 @@ public class MetadataTest {
protected CTFTrace testSingleFragment() throws CTFReaderException {
fixture = new Metadata();
CTFTrace trace = fixture.getTrace();
- for (Stream s : trace.getStreams()) {
+ for (CTFStream s : trace.getStreams()) {
fail("This should be empty, has" + s.toString());
}
fixture.parseText(mdStart);
int count = 0;
- for (Stream s : trace.getStreams()) {
+ for (CTFStream s : trace.getStreams()) {
count++;
assertNotNull(s);
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/TestAll.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/TestAll.java
index 83bc4ca1b7..10098c300c 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/TestAll.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/TestAll.java
@@ -30,12 +30,12 @@ import org.junit.runners.Suite;
CTFTraceGrowingTest.class,
IOstructgenTest.class,
MetadataTest.class,
- StreamInputPacketIndexEntryTest.class,
- StreamInputPacketIndexTest.class,
- StreamInputReaderTest.class,
- StreamInputReaderTimestampComparatorTest.class,
- StreamInputTest.class,
- StreamTest.class,
+ CTFStreamInputPacketIndexEntryTest.class,
+ CTFStreamInputPacketIndexTest.class,
+ CTFStreamInputReaderTest.class,
+ CTFStreamInputReaderTimestampComparatorTest.class,
+ CTFStreamInputTest.class,
+ CTFStreamTest.class,
UtilsTest.class
})
public class TestAll {
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
index 66a258e8df..600d3bcb60 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
@@ -24,7 +24,7 @@ import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
import org.junit.Before;
import org.junit.Test;
@@ -55,7 +55,7 @@ public class EventDeclarationTest {
fixture.setContext(new StructDeclaration(1L));
fixture.setId(1L);
fixture.setFields(new StructDeclaration(1L));
- fixture.setStream(new Stream(testTrace.getTrace()));
+ fixture.setStream(new CTFStream(testTrace.getTrace()));
fixture.setName("");
}
@@ -99,7 +99,7 @@ public class EventDeclarationTest {
obj.setContext(new StructDeclaration(1L));
obj.setId(1L);
obj.setFields(new StructDeclaration(1L));
- obj.setStream(new Stream(testTrace.getTrace()));
+ obj.setStream(new CTFStream(testTrace.getTrace()));
obj.setName("");
assertTrue(fixture.equals(fixture));
@@ -235,7 +235,7 @@ public class EventDeclarationTest {
*/
@Test
public void testGetStream() {
- Stream result = fixture.getStream();
+ CTFStream result = fixture.getStream();
assertNotNull(result);
}
@@ -253,7 +253,7 @@ public class EventDeclarationTest {
*/
@Test
public void testHashCode_null() {
- fixture.setStream((Stream) null);
+ fixture.setStream((CTFStream) null);
fixture.setName((String) null);
int result = fixture.hashCode();
@@ -303,7 +303,7 @@ public class EventDeclarationTest {
*/
@Test
public void testStreamIsSet_null() {
- fixture.setStream((Stream) null);
+ fixture.setStream((CTFStream) null);
boolean result = fixture.streamIsSet();
assertEquals(false, result);
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java
index 183bfc0221..f2fb8ca885 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java
@@ -21,7 +21,7 @@ import org.eclipse.linuxtools.ctf.core.event.scope.LexicalScope;
import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInputReader;
import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
import com.google.common.collect.ImmutableList;
@@ -71,7 +71,7 @@ public final class EventDefinition implements IDefinitionScope {
/**
* The StreamInputReader that reads this event definition.
*/
- private final StreamInputReader fStreamInputReader;
+ private final CTFStreamInputReader fStreamInputReader;
// ------------------------------------------------------------------------
// Constructors
@@ -97,7 +97,7 @@ public final class EventDefinition implements IDefinitionScope {
* @since 3.0
*/
public EventDefinition(IEventDeclaration declaration,
- StreamInputReader streamInputReader,
+ CTFStreamInputReader streamInputReader,
long timestamp,
StructDefinition streamContext,
StructDefinition eventContext,
@@ -220,8 +220,9 @@ public final class EventDefinition implements IDefinitionScope {
* Gets the stream input reader that this event was made by
*
* @return the parent
+ * @since 3.0
*/
- public StreamInputReader getStreamInputReader() {
+ public CTFStreamInputReader getStreamInputReader() {
return fStreamInputReader;
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/IEventDeclaration.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/IEventDeclaration.java
index e10470d685..6107114716 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/IEventDeclaration.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/IEventDeclaration.java
@@ -17,8 +17,8 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.linuxtools.ctf.core.event.io.BitBuffer;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInputReader;
/**
* Representation of one type of event. A bit like "int" or "long" but for trace
@@ -44,7 +44,7 @@ public interface IEventDeclaration {
* IOExceptions.
* @since 3.0
*/
- EventDefinition createDefinition(StreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFReaderException;
+ EventDefinition createDefinition(CTFStreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFReaderException;
/**
* Gets the name of an event declaration
@@ -75,12 +75,12 @@ public interface IEventDeclaration {
Long getId();
/**
- * Gets the {@link Stream} of an event declaration
+ * Gets the {@link CTFStream} of an event declaration
*
* @return the stream
- * @since 2.0
+ * @since 3.0
*/
- Stream getStream();
+ CTFStream getStream();
/**
* What is the log level of this event?
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java
index e87888fa3e..c8defa3352 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java
@@ -26,9 +26,9 @@ import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseE
* <b><u>Stream</u></b>
* <p>
* Represents a stream in a trace.
- * @since 2.0
+ * @since 3.0
*/
-public class Stream {
+public class CTFStream {
// ------------------------------------------------------------------------
// Attributes
@@ -60,7 +60,7 @@ public class Stream {
/**
* The inputs associated to this stream
*/
- private final Set<StreamInput> fInputs = new HashSet<>();
+ private final Set<CTFStreamInput> fInputs = new HashSet<>();
// ------------------------------------------------------------------------
// Constructors
@@ -72,7 +72,7 @@ public class Stream {
* @param trace
* The trace to which belongs this stream.
*/
- public Stream(CTFTrace trace) {
+ public CTFStream(CTFTrace trace) {
fTrace = trace;
}
@@ -181,7 +181,7 @@ public class Stream {
*
* @return the set of all stream inputs for this stream
*/
- public Set<StreamInput> getStreamInputs() {
+ public Set<CTFStreamInput> getStreamInputs() {
return fInputs;
}
@@ -257,7 +257,7 @@ public class Stream {
* @param input
* The StreamInput to add.
*/
- public void addInput(StreamInput input) {
+ public void addInput(CTFStreamInput input) {
fInputs.add(input);
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInput.java
index 03db342316..af7f964085 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInput.java
@@ -41,9 +41,9 @@ import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntr
* <p>
* Represents a trace file that belongs to a certain stream.
*
- * @since 2.0
+ * @since 3.0
*/
-public class StreamInput implements IDefinitionScope, AutoCloseable {
+public class CTFStreamInput implements IDefinitionScope, AutoCloseable {
// ------------------------------------------------------------------------
// Attributes
@@ -52,7 +52,7 @@ public class StreamInput implements IDefinitionScope, AutoCloseable {
/**
* The associated Stream
*/
- private final Stream fStream;
+ private final CTFStream fStream;
/**
* FileChannel to the trace file
@@ -104,9 +104,8 @@ public class StreamInput implements IDefinitionScope, AutoCloseable {
* Information about the trace file (for debugging purposes).
* @throws CTFReaderException
* The file must exist
- * @since 3.0
*/
- public StreamInput(Stream stream, File file) throws CTFReaderException {
+ public CTFStreamInput(CTFStream stream, File file) throws CTFReaderException {
fStream = stream;
fFile = file;
try {
@@ -119,9 +118,6 @@ public class StreamInput implements IDefinitionScope, AutoCloseable {
fIndex = new StreamInputPacketIndex();
}
- /**
- * @since 3.0
- */
@Override
public void close() throws IOException {
fFileChannel.close();
@@ -137,7 +133,7 @@ public class StreamInput implements IDefinitionScope, AutoCloseable {
*
* @return the stream the streamInput wrapper is wrapping
*/
- public Stream getStream() {
+ public CTFStream getStream() {
return fStream;
}
@@ -182,8 +178,6 @@ public class StreamInput implements IDefinitionScope, AutoCloseable {
/**
* Useless for streaminputs
- *
- * @since 3.0
*/
@Override
public LexicalScope getScopePath() {
@@ -508,10 +502,10 @@ public class StreamInput implements IDefinitionScope, AutoCloseable {
if (obj == null) {
return false;
}
- if (!(obj instanceof StreamInput)) {
+ if (!(obj instanceof CTFStreamInput)) {
return false;
}
- StreamInput other = (StreamInput) obj;
+ CTFStreamInput other = (CTFStreamInput) obj;
if (fFile == null) {
if (other.fFile != null) {
return false;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java
index 6ad4ebcf0b..8530c86f82 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java
@@ -36,11 +36,11 @@ import com.google.common.collect.ImmutableList;
/**
* CTF trace packet reader. Reads the events of a packet of a trace file.
*
- * @version 1.0
* @author Matthew Khouzam
* @author Simon Marchi
+ * @since 3.0
*/
-public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable {
+public class CTFStreamInputPacketReader implements IDefinitionScope, AutoCloseable {
// ------------------------------------------------------------------------
// Attributes
@@ -51,7 +51,7 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
private final BitBuffer fBitBuffer;
/** StreamInputReader that uses this StreamInputPacketReader. */
- private final StreamInputReader fStreamInputReader;
+ private final CTFStreamInputReader fStreamInputReader;
/** Trace packet header. */
private final StructDeclaration fTracePacketHeaderDecl;
@@ -98,14 +98,14 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* @param streamInputReader
* The StreamInputReader to which this packet reader belongs to.
*/
- public StreamInputPacketReader(StreamInputReader streamInputReader) {
+ public CTFStreamInputPacketReader(CTFStreamInputReader streamInputReader) {
fStreamInputReader = streamInputReader;
/* Set the BitBuffer's byte order. */
fBitBuffer = new BitBuffer();
fBitBuffer.setByteOrder(streamInputReader.getByteOrder());
- final Stream currentStream = streamInputReader.getStreamInput().getStream();
+ final CTFStream currentStream = streamInputReader.getStreamInput().getStream();
fTracePacketHeaderDecl = currentStream.getTrace().getPacketHeader();
fStreamPacketContextDecl = currentStream.getPacketContextDecl();
fStreamEventHeaderDecl = currentStream.getEventHeaderDecl();
@@ -120,7 +120,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* @return an context definition, can be null
* @throws CTFReaderException
* out of bounds exception or such
- * @since 3.0
*/
public StructDefinition getEventContextDefinition(@NonNull BitBuffer input) throws CTFReaderException {
return fStreamEventContextDecl.createDefinition(this, LexicalScope.STREAM_EVENT_CONTEXT.getName(), input);
@@ -134,7 +133,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* @return an context definition, can be null
* @throws CTFReaderException
* out of bounds exception or such
- * @since 3.0
*/
public StructDefinition getStreamEventHeaderDefinition(@NonNull BitBuffer input) throws CTFReaderException {
return fStreamEventHeaderDecl.createDefinition(this, LexicalScope.STREAM_EVENT_HEADER.getName(), input);
@@ -148,7 +146,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* @return an context definition, can be null
* @throws CTFReaderException
* out of bounds exception or such
- * @since 3.0
*/
public StructDefinition getStreamPacketContextDefinition(@NonNull BitBuffer input) throws CTFReaderException {
return fStreamPacketContextDecl.createDefinition(this, LexicalScope.STREAM_PACKET_CONTEXT.getName(), input);
@@ -162,7 +159,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* @return an header definition, can be null
* @throws CTFReaderException
* out of bounds exception or such
- * @since 3.0
*/
public StructDefinition getTracePacketHeaderDefinition(@NonNull BitBuffer input) throws CTFReaderException {
return fTracePacketHeaderDecl.createDefinition(this, LexicalScope.TRACE_PACKET_HEADER.getName(), input);
@@ -170,8 +166,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
/**
* Dispose the StreamInputPacketReader
- *
- * @since 3.0
*/
@Override
public void close() {
@@ -200,9 +194,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
return fCurrentCpu;
}
- /**
- * @since 3.0
- */
@Override
public LexicalScope getScopePath() {
return LexicalScope.PACKET;
@@ -477,7 +468,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* Get stream event header
*
* @return the stream event header
- * @since 3.0
*/
public StructDefinition getCurrentStreamEventHeader() {
return fCurrentStreamEventHeaderDef;
@@ -487,7 +477,6 @@ public class StreamInputPacketReader implements IDefinitionScope, AutoCloseable
* Get the current packet event header
*
* @return the current packet event header
- * @since 3.0
*/
public StructDefinition getCurrentPacketEventHeader() {
return fCurrentTracePacketHeaderDef;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputReader.java
index e0f7c1624e..df445750e1 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputReader.java
@@ -24,11 +24,11 @@ import com.google.common.collect.ImmutableSet;
/**
* A CTF trace event reader. Reads the events of a trace file.
*
- * @version 1.0
* @author Matthew Khouzam
* @author Simon Marchi
+ * @since 3.0
*/
-public class StreamInputReader implements AutoCloseable {
+public class CTFStreamInputReader implements AutoCloseable {
// ------------------------------------------------------------------------
// Attributes
@@ -37,12 +37,12 @@ public class StreamInputReader implements AutoCloseable {
/**
* The StreamInput we are reading.
*/
- private final StreamInput fStreamInput;
+ private final CTFStreamInput fStreamInput;
/**
* The packet reader used to read packets from this trace file.
*/
- private final StreamInputPacketReader fPacketReader;
+ private final CTFStreamInputPacketReader fPacketReader;
/**
* Iterator on the packet index
@@ -75,11 +75,10 @@ public class StreamInputReader implements AutoCloseable {
* The StreamInput to read.
* @throws CTFReaderException
* if an error occurs
- * @since 2.0
*/
- public StreamInputReader(StreamInput streamInput) throws CTFReaderException {
+ public CTFStreamInputReader(CTFStreamInput streamInput) throws CTFReaderException {
fStreamInput = streamInput;
- fPacketReader = new StreamInputPacketReader(this);
+ fPacketReader = new CTFStreamInputPacketReader(this);
/*
* Get the iterator on the packet index.
*/
@@ -92,8 +91,6 @@ public class StreamInputReader implements AutoCloseable {
/**
* Dispose the StreamInputReader
- *
- * @since 3.0
*/
@Override
public void close() {
@@ -164,7 +161,7 @@ public class StreamInputReader implements AutoCloseable {
/*
* for internal use only
*/
- StreamInput getStreamInput() {
+ CTFStreamInput getStreamInput() {
return fStreamInput;
}
@@ -172,7 +169,6 @@ public class StreamInputReader implements AutoCloseable {
* Gets the event definition set for this StreamInput
*
* @return Unmodifiable set with the event definitions
- * @since 3.0
*/
public Iterable<IEventDeclaration> getEventDeclarations() {
return ImmutableSet.copyOf(fStreamInput.getStream().getEvents().values());
@@ -183,7 +179,6 @@ public class StreamInputReader implements AutoCloseable {
*
* @param live
* whether the trace is read live or not
- * @since 3.0
*/
public void setLive(boolean live) {
fLive = live;
@@ -193,7 +188,6 @@ public class StreamInputReader implements AutoCloseable {
* Get if the trace is to read live or not
*
* @return whether the trace is live or not
- * @since 3.0
*/
public boolean isLive() {
return fLive;
@@ -203,7 +197,6 @@ public class StreamInputReader implements AutoCloseable {
* Get the event context of the stream
*
* @return the event context declaration of the stream
- * @since 3.0
*/
public StructDeclaration getStreamEventContextDecl() {
return getStreamInput().getStream().getEventContextDecl();
@@ -218,7 +211,6 @@ public class StreamInputReader implements AutoCloseable {
* @return If an event has been successfully read.
* @throws CTFReaderException
* if an error occurs
- * @since 3.0
*/
public CTFResponse readNextEvent() throws CTFReaderException {
@@ -429,7 +421,7 @@ public class StreamInputReader implements AutoCloseable {
/**
* @return the packetReader
*/
- public StreamInputPacketReader getPacketReader() {
+ public CTFStreamInputPacketReader getPacketReader() {
return fPacketReader;
}
@@ -451,10 +443,10 @@ public class StreamInputReader implements AutoCloseable {
if (obj == null) {
return false;
}
- if (!(obj instanceof StreamInputReader)) {
+ if (!(obj instanceof CTFStreamInputReader)) {
return false;
}
- StreamInputReader other = (StreamInputReader) obj;
+ CTFStreamInputReader other = (CTFStreamInputReader) obj;
if (fId != other.fId) {
return false;
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
index b945cf12d6..563d8215cc 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
@@ -116,7 +116,7 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
/**
* Collection of streams contained in the trace.
*/
- private final Map<Long, Stream> fStreams = new HashMap<>();
+ private final Map<Long, CTFStream> fStreams = new HashMap<>();
/**
* Collection of environment variables set by the tracer
@@ -210,9 +210,9 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
}
/* Create their index */
- for (Stream stream : getStreams()) {
- Set<StreamInput> inputs = stream.getStreamInputs();
- for (StreamInput s : inputs) {
+ for (CTFStream stream : getStreams()) {
+ Set<CTFStreamInput> inputs = stream.getStreamInputs();
+ for (CTFStreamInput s : inputs) {
addStream(s);
}
}
@@ -272,9 +272,9 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
* @param id
* Long the id of the stream
* @return Stream the stream that we need
- * @since 2.0
+ * @since 3.0
*/
- public Stream getStream(Long id) {
+ public CTFStream getStream(Long id) {
return fStreams.get(id);
}
@@ -444,7 +444,7 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
* @return Iterable&lt;Stream&gt; an iterable over streams.
* @since 3.0
*/
- public Iterable<Stream> getStreams() {
+ public Iterable<CTFStream> getStreams() {
return fStreams.values();
}
@@ -470,7 +470,7 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
// Operations
// ------------------------------------------------------------------------
- private void addStream(StreamInput s) {
+ private void addStream(CTFStreamInput s) {
/*
* Copy the events
@@ -502,10 +502,10 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
* @throws CTFReaderException
* if there is a file error
*/
- private Stream openStreamInput(File streamFile) throws CTFReaderException {
+ private CTFStream openStreamInput(File streamFile) throws CTFReaderException {
MappedByteBuffer byteBuffer;
BitBuffer streamBitBuffer;
- Stream stream;
+ CTFStream stream;
FileChannel fc;
if (!streamFile.canRead()) {
@@ -580,7 +580,7 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
* Create the stream input and add a reference to the streamInput in the
* stream
*/
- stream.addInput(new StreamInput(stream, streamFile));
+ stream.addInput(new CTFStreamInput(stream, streamFile));
return stream;
}
@@ -622,9 +622,9 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
* A stream object.
* @throws ParseException
* If there was some problem reading the metadata
- * @since 2.0
+ * @since 3.0
*/
- public void addStream(Stream stream) throws ParseException {
+ public void addStream(CTFStream stream) throws ParseException {
/*
* If there is already a stream without id (the null key), it must be
* the only one
@@ -644,7 +644,7 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
/*
* If a stream with the same ID already exists, it is not valid.
*/
- Stream existingStream = fStreams.get(stream.getId());
+ CTFStream existingStream = fStreams.get(stream.getId());
if (existingStream != null) {
throw new ParseException("Stream id already exists"); //$NON-NLS-1$
}
@@ -905,14 +905,14 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
* @since 3.0
*/
public void addStream(long id, File streamFile) throws CTFReaderException {
- Stream stream = null;
+ CTFStream stream = null;
if (fStreams.containsKey(id)) {
stream = fStreams.get(id);
} else {
- stream = new Stream(this);
+ stream = new CTFStream(this);
fStreams.put(id, stream);
}
- stream.addInput(new StreamInput(stream, streamFile));
+ stream.addInput(new CTFStreamInput(stream, streamFile));
}
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java
index e640bc32c7..5ae504315d 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java
@@ -50,12 +50,12 @@ public class CTFTraceReader implements AutoCloseable {
/**
* Vector of all the trace file readers.
*/
- private final List<StreamInputReader> fStreamInputReaders = new ArrayList<>();
+ private final List<CTFStreamInputReader> fStreamInputReaders = new ArrayList<>();
/**
* Priority queue to order the trace file readers by timestamp.
*/
- private PriorityQueue<StreamInputReader> fPrio;
+ private PriorityQueue<CTFStreamInputReader> fPrio;
/**
* Array to count the number of event per trace file.
@@ -132,7 +132,7 @@ public class CTFTraceReader implements AutoCloseable {
*/
@Override
public void close() {
- for (StreamInputReader reader : fStreamInputReaders) {
+ for (CTFStreamInputReader reader : fStreamInputReaders) {
if (reader != null) {
reader.close();
}
@@ -169,7 +169,7 @@ public class CTFTraceReader implements AutoCloseable {
* @return The priority queue of input readers
* @since 2.0
*/
- protected PriorityQueue<StreamInputReader> getPrio() {
+ protected PriorityQueue<CTFStreamInputReader> getPrio() {
return fPrio;
}
@@ -187,17 +187,17 @@ public class CTFTraceReader implements AutoCloseable {
/*
* For each stream.
*/
- for (Stream stream : fTrace.getStreams()) {
- Set<StreamInput> streamInputs = stream.getStreamInputs();
+ for (CTFStream stream : fTrace.getStreams()) {
+ Set<CTFStreamInput> streamInputs = stream.getStreamInputs();
/*
* For each trace file of the stream.
*/
- for (StreamInput streamInput : streamInputs) {
+ for (CTFStreamInput streamInput : streamInputs) {
/*
* Create a reader.
*/
- StreamInputReader streamInputReader = new StreamInputReader(
+ CTFStreamInputReader streamInputReader = new CTFStreamInputReader(
streamInput);
/*
@@ -222,14 +222,14 @@ public class CTFTraceReader implements AutoCloseable {
* @since 3.0
*/
public void update() throws CTFReaderException {
- Set<StreamInputReader> readers = new HashSet<>();
- for (Stream stream : fTrace.getStreams()) {
- Set<StreamInput> streamInputs = stream.getStreamInputs();
- for (StreamInput streamInput : streamInputs) {
+ Set<CTFStreamInputReader> readers = new HashSet<>();
+ for (CTFStream stream : fTrace.getStreams()) {
+ Set<CTFStreamInput> streamInputs = stream.getStreamInputs();
+ for (CTFStreamInput streamInput : streamInputs) {
/*
* Create a reader.
*/
- StreamInputReader streamInputReader = new StreamInputReader(
+ CTFStreamInputReader streamInputReader = new CTFStreamInputReader(
streamInput);
/*
@@ -244,7 +244,7 @@ public class CTFTraceReader implements AutoCloseable {
}
long[] temp = fEventCountPerTraceFile;
fEventCountPerTraceFile = new long[readers.size() + temp.length];
- for (StreamInputReader reader : readers) {
+ for (CTFStreamInputReader reader : readers) {
fPrio.add(reader);
}
for (int i = 0; i < temp.length; i++) {
@@ -260,7 +260,7 @@ public class CTFTraceReader implements AutoCloseable {
*/
public Iterable<IEventDeclaration> getEventDeclarations() {
ImmutableSet.Builder<IEventDeclaration> builder = new Builder<>();
- for (StreamInputReader sir : fStreamInputReaders) {
+ for (CTFStreamInputReader sir : fStreamInputReaders) {
builder.addAll(sir.getEventDeclarations());
}
return builder.build();
@@ -290,7 +290,7 @@ public class CTFTraceReader implements AutoCloseable {
int pos = 0;
- for (StreamInputReader reader : fStreamInputReaders) {
+ for (CTFStreamInputReader reader : fStreamInputReaders) {
/*
* Add each trace file reader in the priority queue, if we are able
* to read an event from it.
@@ -316,7 +316,7 @@ public class CTFTraceReader implements AutoCloseable {
* of the trace.
*/
public EventDefinition getCurrentEventDef() {
- StreamInputReader top = getTopStream();
+ CTFStreamInputReader top = getTopStream();
return (top != null) ? top.getCurrentEvent() : null;
}
@@ -332,7 +332,7 @@ public class CTFTraceReader implements AutoCloseable {
/*
* Remove the reader from the top of the priority queue.
*/
- StreamInputReader top = fPrio.poll();
+ CTFStreamInputReader top = fPrio.poll();
/*
* If the queue was empty.
@@ -408,7 +408,7 @@ public class CTFTraceReader implements AutoCloseable {
* Remove all the trace readers from the priority queue
*/
fPrio.clear();
- for (StreamInputReader streamInputReader : fStreamInputReaders) {
+ for (CTFStreamInputReader streamInputReader : fStreamInputReaders) {
/*
* Seek the trace reader.
*/
@@ -428,8 +428,9 @@ public class CTFTraceReader implements AutoCloseable {
* Gets the stream with the oldest event
*
* @return the stream with the oldest event
+ * @since 3.0
*/
- public StreamInputReader getTopStream() {
+ public CTFStreamInputReader getTopStream() {
return fPrio.peek();
}
@@ -466,7 +467,7 @@ public class CTFTraceReader implements AutoCloseable {
}
for (int j = 0; j < fEventCountPerTraceFile.length; j++) {
- StreamInputReader se = fStreamInputReaders.get(j);
+ CTFStreamInputReader se = fStreamInputReaders.get(j);
long len = (width * fEventCountPerTraceFile[se.getName()])
/ numEvents;
@@ -505,7 +506,7 @@ public class CTFTraceReader implements AutoCloseable {
* @since 3.0
*/
public void setLive(boolean live) {
- for (StreamInputReader s : fPrio) {
+ for (CTFStreamInputReader s : fPrio) {
s.setLive(live);
}
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/EventDeclaration.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/EventDeclaration.java
index abd15b671e..f76330fbb6 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/EventDeclaration.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/EventDeclaration.java
@@ -27,8 +27,8 @@ import org.eclipse.linuxtools.ctf.core.event.types.IntegerDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInputReader;
/**
* Representation of one type of event. A bit like "int" or "long" but for trace
@@ -73,7 +73,7 @@ public class EventDeclaration implements IEventDeclaration {
/**
* Stream to which belongs this event.
*/
- private Stream fStream = null;
+ private CTFStream fStream = null;
/**
* Loglevel of an event
@@ -95,7 +95,7 @@ public class EventDeclaration implements IEventDeclaration {
}
@Override
- public EventDefinition createDefinition(StreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFReaderException {
+ public EventDefinition createDefinition(CTFStreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFReaderException {
StructDeclaration streamEventContextDecl = streamInputReader.getStreamEventContextDecl();
StructDefinition streamEventContext = streamEventContextDecl != null ? streamEventContextDecl.createDefinition(null, LexicalScope.STREAM_EVENT_CONTEXT.toString(), input) : null;
StructDefinition packetContext = streamInputReader.getPacketReader().getCurrentPacketEventHeader();
@@ -202,12 +202,12 @@ public class EventDeclaration implements IEventDeclaration {
* the stream
* @since 2.0
*/
- public void setStream(Stream stream) {
+ public void setStream(CTFStream stream) {
fStream = stream;
}
@Override
- public Stream getStream() {
+ public CTFStream getStream() {
return fStream;
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java
index 3f43802442..202997e9b6 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java
@@ -42,7 +42,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StringDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.VariantDeclaration;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
import org.eclipse.linuxtools.ctf.parser.CTFParser;
import org.eclipse.linuxtools.internal.ctf.core.Activator;
import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
@@ -252,7 +252,7 @@ public class IOStructGen {
}
} else {
/* Add an empty stream that will have a null id */
- fTrace.addStream(new Stream(fTrace));
+ fTrace.addStream(new CTFStream(fTrace));
}
if (DEBUG) {
@@ -621,7 +621,7 @@ public class IOStructGen {
private void parseStream(CommonTree streamNode) throws ParseException {
- Stream stream = new Stream(fTrace);
+ CTFStream stream = new CTFStream(fTrace);
List<CommonTree> children = streamNode.getChildren();
if (children == null) {
@@ -660,7 +660,7 @@ public class IOStructGen {
popScope();
}
- private void parseStreamDeclaration(CommonTree streamDecl, Stream stream)
+ private void parseStreamDeclaration(CommonTree streamDecl, CTFStream stream)
throws ParseException {
/* There should be a left and right */
@@ -794,7 +794,7 @@ public class IOStructGen {
* could be possible to just get the only existing stream, whatever
* is its id.
*/
- Stream stream = fTrace.getStream(null);
+ CTFStream stream = fTrace.getStream(null);
if (stream != null) {
event.setStream(stream);
@@ -850,7 +850,7 @@ public class IOStructGen {
long streamId = getStreamID(rightNode);
- Stream stream = fTrace.getStream(streamId);
+ CTFStream stream = fTrace.getStream(streamId);
if (stream == null) {
throw new ParseException("Stream " + streamId + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java
index 39768fb443..01582c254b 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java
@@ -16,7 +16,7 @@ import java.io.Serializable;
import java.util.Comparator;
import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInputReader;
import org.eclipse.linuxtools.ctf.core.trace.Utils;
/**
@@ -25,7 +25,7 @@ import org.eclipse.linuxtools.ctf.core.trace.Utils;
* Compares two StreamInputReader by their timestamp (smaller comes before).
*/
public class StreamInputReaderTimestampComparator implements
- Comparator<StreamInputReader>, Serializable {
+ Comparator<CTFStreamInputReader>, Serializable {
// ------------------------------------------------------------------------
// Constants
@@ -39,11 +39,11 @@ public class StreamInputReaderTimestampComparator implements
/**
* @throws NullPointerException
- * If any {@link StreamInputReader} parameter is null, of if any
+ * If any {@link CTFStreamInputReader} parameter is null, of if any
* of them does not contain a current event.
*/
@Override
- public int compare(StreamInputReader a, StreamInputReader b) {
+ public int compare(CTFStreamInputReader a, CTFStreamInputReader b) {
EventDefinition event_a = a.getCurrentEvent();
EventDefinition event_b = b.getCurrentEvent();
diff --git a/lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/relayd/LttngRelaydConsumer.java b/lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/relayd/LttngRelaydConsumer.java
index ad669de747..0df2041d04 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/relayd/LttngRelaydConsumer.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/relayd/LttngRelaydConsumer.java
@@ -25,8 +25,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.Metadata;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStream;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInput;
import org.eclipse.linuxtools.internal.lttng2.control.core.Activator;
import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.LttngViewerCommands;
@@ -72,8 +72,8 @@ public class LttngRelaydConsumer {
fPort = port;
fSession = session;
fCtfTrace = ctfTrace;
- for (Stream s : fCtfTrace.getCTFTrace().getStreams()) {
- for (StreamInput si : s.getStreamInputs()) {
+ for (CTFStream s : fCtfTrace.getCTFTrace().getStreams()) {
+ for (CTFStreamInput si : s.getStreamInputs()) {
fStreams.put(si.getStream().getId(), new File(si.getStream().getTrace().getPath() + si.getFilename()));
}
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ctf.core/src/org/eclipse/linuxtools/tmf/ctf/core/CtfIterator.java b/lttng/org.eclipse.linuxtools.tmf.ctf.core/src/org/eclipse/linuxtools/tmf/ctf/core/CtfIterator.java
index 3f542b710f..a08b29c3d5 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ctf.core/src/org/eclipse/linuxtools/tmf/ctf/core/CtfIterator.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ctf.core/src/org/eclipse/linuxtools/tmf/ctf/core/CtfIterator.java
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.ctf.core;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.ctf.core.trace.CTFStreamInputReader;
import org.eclipse.linuxtools.internal.tmf.ctf.core.Activator;
import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
import org.eclipse.linuxtools.tmf.core.trace.location.ITmfLocation;
@@ -127,7 +127,7 @@ public class CtfIterator extends CTFTraceReader
* @return CtfTmfEvent The current event
*/
public synchronized CtfTmfEvent getCurrentEvent() {
- final StreamInputReader top = super.getPrio().peek();
+ final CTFStreamInputReader top = super.getPrio().peek();
if (top != null) {
if (!fCurLocation.equals(fPreviousLocation)) {
fPreviousLocation = fCurLocation;

Back to the top