import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
import org.eclipse.linuxtools.internal.lttng2.core.control.model.IDomainInfo;
import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISnapshotInfo;
import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType;
import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel;
import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceSessionState;
fSessionInfo.setStreamedTrace(isStreamedTrace);
}
+ /**
+ * Returns whether the session is snapshot session or not
+ * @return <code>true</code> if it is snapshot session else <code>false</code>
+ */
+ public boolean isSnapshotSession() {
+ return fSessionInfo.isSnapshotSession();
+ }
+
+ /**
+ * Gets the snapshot information if available whether the session is a snapshot session or not
+ * @return the snapshot information or null if it is not a snapshot session
+ */
+ public ISnapshotInfo getSnapshotInfo() {
+ return fSessionInfo.getSnapshotInfo();
+ }
+
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
return ((TargetNodeComponent)getParent().getParent()).isEventFilteringSupported();
}
+ /**
+ * Returns if node supports snapshots or not
+ * @return <code>true</code> if it supports snapshots else <code>false</code>
+ *
+ */
+ public boolean isSnapshotSupported() {
+ return ((TargetNodeComponent)getParent().getParent()).isSnapshotSupported();
+ }
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
throws ExecutionException {
removeAllChildren();
fSessionInfo = getControlService().getSession(getName(), monitor);
+
IDomainInfo[] domains = fSessionInfo.getDomains();
for (int i = 0; i < domains.length; i++) {
TraceDomainComponent domainComponent = new TraceDomainComponent(
throws ExecutionException {
return getControlService().getContextList(monitor);
}
+
+ /**
+ * Records a snapshot.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void recordSnapshot(IProgressMonitor monitor) throws ExecutionException {
+ getControlService().recordSnapshot(getName(), monitor);
+ }
}