lttng: Add snapshot support - LTTng Tools v2.3
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / model / impl / TraceSessionGroup.java
index 20e315d99ad8e39f611df8255b5bce001e1149e9..66c151edbf2af59ff5cdb61d246a8da591a949a8 100644 (file)
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *   Bernd Hufmann - Initial API and implementation
+ *   Bernd Hufmann - Updated for support of LTTng Tools 2.1
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;
 
@@ -68,6 +69,13 @@ public class TraceSessionGroup extends TraceControlComponent {
     public boolean isNetworkStreamingSupported() {
         return getTargetNode().isNetworkStreamingSupported();
     }
+    /**
+     * Returns if node supports snapshots or not
+     * @return <code>true</code> if it supports snapshots else <code>false</code>
+     *
+     */    public boolean isSnapshotSupported() {
+        return getTargetNode().isSnapshotSupported();
+    }
 
     // ------------------------------------------------------------------------
     // Operations
@@ -108,35 +116,15 @@ public class TraceSessionGroup extends TraceControlComponent {
      *            - a session name to create
      * @param sessionPath
      *            - a path for storing the traces (use null for default)
-     * @param noConsumer
-     *            - a flag to indicate no consumer
-     * @param disableConsumer
-     *            - a flag to disable consumer
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void createSession(String sessionName, String sessionPath, boolean noConsumer, boolean disableConsumer) throws ExecutionException {
-        createSession(sessionName, sessionPath, noConsumer, disableConsumer, new NullProgressMonitor());
-    }
-
-    /**
-     * Creates a session with given session name and location.
-     *
-     * @param sessionName
-     *            - a session name to create
-     * @param sessionPath
-     *            - a path for storing the traces (use null for default)
-     * @param noConsumer
-     *            - a flag to indicate no consumer
-     * @param disableConsumer
-     *            - a flag to disable consumer
+     * @param isSnapshot
+     *            - true for snapshot session else false
      * @param monitor
      *            - a progress monitor
      * @throws ExecutionException
      *             If the command fails
      */
-    public void createSession(String sessionName, String sessionPath, boolean noConsumer, boolean disableConsumer, IProgressMonitor monitor) throws ExecutionException {
-        ISessionInfo sessionInfo = getControlService().createSession(sessionName, sessionPath, noConsumer, disableConsumer, monitor);
+    public void createSession(String sessionName, String sessionPath, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException {
+        ISessionInfo sessionInfo = getControlService().createSession(sessionName, sessionPath, isSnapshot, monitor);
 
         if (sessionInfo != null) {
             TraceSessionComponent session = new TraceSessionComponent(
@@ -158,40 +146,15 @@ public class TraceSessionGroup extends TraceControlComponent {
      *            - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
      * @param dataUrl
      *            - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
-     * @param noConsumer
-     *            - a flag to indicate no consumer
-     * @param disableConsumer
-     *            - a flag to disable consumer
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean noConsumer, boolean disableConsumer) throws ExecutionException {
-        createSession(sessionName, networkUrl, controlUrl, dataUrl, noConsumer, disableConsumer, new NullProgressMonitor());
-    }
-
-    /**
-     * Creates a session with given session name and location.
-     *
-     * @param sessionName
-     *            - a session name to create
-     * @param networkUrl
-     *            - a network URL for common definition of data and control channel
-     *              or null if separate definition of data and control channel
-     * @param controlUrl
-     *            - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
-     * @param dataUrl
-     *            - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
-     * @param noConsumer
-     *            - a flag to indicate no consumer
-     * @param disableConsumer
-     *            - a flag to disable consumer
+     * @param isSnapshot
+     *            - true for snapshot session else false
      * @param monitor
      *            - a progress monitor
      * @throws ExecutionException
      *             If the command fails
      */
-    public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean noConsumer, boolean disableConsumer, IProgressMonitor monitor) throws ExecutionException {
-        ISessionInfo sessionInfo = getControlService().createSession(sessionName, networkUrl, controlUrl, dataUrl, noConsumer, disableConsumer, monitor);
+    public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean isSnapshot, IProgressMonitor monitor) throws ExecutionException {
+        ISessionInfo sessionInfo = getControlService().createSession(sessionName, networkUrl, controlUrl, dataUrl, isSnapshot, monitor);
 
         if (sessionInfo != null) {
             TraceSessionComponent session = new TraceSessionComponent(sessionInfo.getName(), TraceSessionGroup.this);
@@ -200,19 +163,6 @@ public class TraceSessionGroup extends TraceControlComponent {
         }
     }
 
-    /**
-     * Destroys a session with given session name.
-     *
-     * @param session
-     *            - a session component to destroy
-     * @throws ExecutionException
-     *             If the command fails
-     */
-    public void destroySession(TraceSessionComponent session)
-            throws ExecutionException {
-        destroySession(session, new NullProgressMonitor());
-    }
-
     /**
      * Destroys a session with given session name.
      *
This page took 0.025372 seconds and 5 git commands to generate.