1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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 * Bernd Hufmann - Initial API and implementation
11 * Simon Delisle - Updated for support of LTTng Tools 2.2
12 **********************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
;
15 import java
.util
.List
;
17 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
.impl
.BufferType
;
21 * Interface for retrieval of trace channel information.
24 * @author Bernd Hufmann
26 public interface IChannelInfo
extends ITraceInfo
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
32 * Default value for overwrite mode.
34 public final static boolean DEFAULT_OVERWRITE_MODE
= false;
37 * @return the overwrite mode value.
39 boolean isOverwriteMode();
41 * Sets the overwrite mode value to the given mode.
42 * @param mode - mode to set.
44 void setOverwriteMode(boolean mode
);
47 * @return the sub-buffer size.
49 long getSubBufferSize();
51 * Sets the sub-buffer size to the given value.
52 * @param bufferSize - size to set to set.
54 void setSubBufferSize(long bufferSize
);
57 * @return the number of sub-buffers.
59 int getNumberOfSubBuffers();
61 * Sets the number of sub-buffers to the given value.
62 * @param numberOfSubBuffers - value to set.
64 void setNumberOfSubBuffers(int numberOfSubBuffers
);
67 * @return the switch timer interval.
69 long getSwitchTimer();
71 * Sets the switch timer interval to the given value.
72 * @param timer - timer value to set.
74 void setSwitchTimer(long timer
);
77 * @return the read timer interval.
81 * Sets the read timer interval to the given value.
82 * @param timer - timer value to set..
84 void setReadTimer(long timer
);
87 * @return the output type.
89 TraceChannelOutputType
getOutputType();
91 * Sets the output type to the given value.
92 * @param type - type to set.
94 void setOutputType(String type
);
96 * Sets the output type to the given value.
97 * @param type - type to set.
99 void setOutputType(TraceChannelOutputType type
);
102 * @return the channel state (enabled or disabled).
104 TraceEnablement
getState();
106 * Sets the channel state (enablement) to the given value.
107 * @param state - state to set.
109 void setState(TraceEnablement state
);
111 * Sets the channel state (enablement) to the value specified by the given name.
112 * @param stateName - state to set.
114 void setState(String stateName
);
117 * @return all event information as array.
119 IEventInfo
[] getEvents();
121 * Sets the event information specified by given list.
122 * @param events - all event information to set.
124 void setEvents(List
<IEventInfo
> events
);
126 * Adds a single event information.
127 * @param event - event information to add.
129 void addEvent(IEventInfo event
);
131 * Sets the maximum size of trace files
132 * @param maxSizeTraceFiles - maximum size
134 void setMaxSizeTraceFiles(int maxSizeTraceFiles
);
136 * Sets the maximum number of trace files
137 * @param maxNumberTraceFiles - maximum number
139 void setMaxNumberTraceFiles(int maxNumberTraceFiles
);
141 * @return maximum size of trace files
143 int getMaxSizeTraceFiles();
145 * @return maximum number of trace files
147 int getMaxNumberTraceFiles();
149 * Sets per UID buffers
150 * @param buffersUID - enable or not
152 void setBufferType(BufferType buffersUID
);
154 * @return the value of buffersUID (enable or not)
156 BufferType
getBufferType();