From 8634587a1e5d363d9cd748524c6dbde4963bc536 Mon Sep 17 00:00:00 2001 From: Matthew Khouzam Date: Mon, 15 Dec 2014 06:25:52 -0500 Subject: [PATCH] lttng.control: make live timer a long Change-Id: Ia24d268ac4ead13fc86e057aebc236a43d23ec8a Signed-off-by: Matthew Khouzam Reviewed-on: https://git.eclipse.org/r/38234 Reviewed-by: Hudson CI Reviewed-by: Marc-Andre Laperle Tested-by: Marc-Andre Laperle --- .../internal/lttng2/control/core/model/ISessionInfo.java | 4 ++-- .../lttng2/control/core/model/impl/SessionInfo.java | 6 +++--- .../control/stubs/dialogs/CreateSessionDialogStub.java | 2 +- .../control/ui/views/dialogs/CreateSessionDialog.java | 6 +++--- .../control/ui/views/service/LTTngControlService.java | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/ISessionInfo.java b/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/ISessionInfo.java index 83126e4e74..3894223d47 100644 --- a/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/ISessionInfo.java +++ b/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/ISessionInfo.java @@ -128,7 +128,7 @@ public interface ISessionInfo extends ITraceInfo { * * @return the live delay or -1 if the default value should be used */ - public int getLiveDelay(); + public long getLiveDelay(); /** * Set the live delay which is the delay in micro seconds before the data is @@ -137,7 +137,7 @@ public interface ISessionInfo extends ITraceInfo { * @param liveDelay * the live delay */ - public void setLiveDelay(int liveDelay); + public void setLiveDelay(long liveDelay); /** * Get the network URL in case control and data is configured together diff --git a/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/impl/SessionInfo.java b/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/impl/SessionInfo.java index fafc039396..53a78fa2e5 100644 --- a/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/impl/SessionInfo.java +++ b/org.eclipse.tracecompass.lttng2.control.core/src/org/eclipse/tracecompass/internal/lttng2/control/core/model/impl/SessionInfo.java @@ -90,7 +90,7 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { /** * The delay in micro seconds before the data is flushed and streamed. */ - private int fLiveDelay = -1; + private long fLiveDelay = -1; /** * The live connection url (Relayd). @@ -232,12 +232,12 @@ public class SessionInfo extends TraceInfo implements ISessionInfo { } @Override - public int getLiveDelay() { + public long getLiveDelay() { return fLiveDelay; } @Override - public void setLiveDelay(int liveDelay) { + public void setLiveDelay(long liveDelay) { fLiveDelay = liveDelay; } diff --git a/org.eclipse.tracecompass.lttng2.control.ui.tests/stubs/org/eclipse/tracecompass/internal/lttng2/control/stubs/dialogs/CreateSessionDialogStub.java b/org.eclipse.tracecompass.lttng2.control.ui.tests/stubs/org/eclipse/tracecompass/internal/lttng2/control/stubs/dialogs/CreateSessionDialogStub.java index 88014c0dea..0d4ca9d827 100644 --- a/org.eclipse.tracecompass.lttng2.control.ui.tests/stubs/org/eclipse/tracecompass/internal/lttng2/control/stubs/dialogs/CreateSessionDialogStub.java +++ b/org.eclipse.tracecompass.lttng2.control.ui.tests/stubs/org/eclipse/tracecompass/internal/lttng2/control/stubs/dialogs/CreateSessionDialogStub.java @@ -32,7 +32,7 @@ public class CreateSessionDialogStub implements ICreateSessionDialog { private String fDataUrl = null; private boolean fIsSnapshot; private boolean fIsLive = false; - private int fLiveDelay = 0; + private long fLiveDelay = 0; @Override public void initialize(TraceSessionGroup group) { diff --git a/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/dialogs/CreateSessionDialog.java b/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/dialogs/CreateSessionDialog.java index 9a341d8399..d81b1b9b9e 100644 --- a/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/dialogs/CreateSessionDialog.java +++ b/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/dialogs/CreateSessionDialog.java @@ -246,7 +246,7 @@ public class CreateSessionDialog extends TitleAreaDialog implements ICreateSessi /** * The live delay */ - private Integer fLiveDelay = 0; + private Long fLiveDelay = 0L; /** * The live url. */ @@ -807,7 +807,7 @@ public class CreateSessionDialog extends TitleAreaDialog implements ICreateSessi if (fParent.isLiveSupported() && fLiveButton != null) { fIsLive = fLiveButton.getSelection(); - fLiveDelay = LTTngControlServiceConstants.UNUSED_VALUE; + fLiveDelay = Long.valueOf(LTTngControlServiceConstants.UNUSED_VALUE); fLiveUrl = SessionInfo.DEFAULT_LIVE_NETWORK_URL; fLivePort = SessionInfo.DEFAULT_LIVE_PORT; } @@ -848,7 +848,7 @@ public class CreateSessionDialog extends TitleAreaDialog implements ICreateSessi if (fIsLive && fLiveGroup != null) { String liveDelayText = fLiveDelayText.getText(); try { - fLiveDelay = liveDelayText.equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.valueOf(liveDelayText); + fLiveDelay = liveDelayText.equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.valueOf(liveDelayText); fLivePort = Integer.valueOf(fLivePortText.getText()); fLiveUrl = fLiveHostAddressText.getText(); } catch (NumberFormatException e) { diff --git a/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/service/LTTngControlService.java b/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/service/LTTngControlService.java index 473f1cc744..1ddbf77995 100644 --- a/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/service/LTTngControlService.java +++ b/org.eclipse.tracecompass.lttng2.control.ui/src/org/eclipse/tracecompass/internal/lttng2/control/ui/views/service/LTTngControlService.java @@ -285,7 +285,7 @@ public class LTTngControlService implements ILttngControlService { } matcher = LTTngControlServiceConstants.LIST_LIVE_TIMER_INTERVAL_PATTERN.matcher(line); if (matcher.matches()) { - int liveDelay = Integer.parseInt(matcher.group(1)); + long liveDelay = Long.parseLong(matcher.group(1)); if (liveDelay > 0) { sessionInfo.setLive(true); sessionInfo.setLiveUrl(SessionInfo.DEFAULT_LIVE_NETWORK_URL); -- 2.34.1