1 /**********************************************************************
2 * Copyright (c) 2012 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 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
;
14 import java
.util
.List
;
18 * Interface for retrieval of trace channel information.
21 * @author Bernd Hufmann
23 public interface IChannelInfo
extends ITraceInfo
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
29 * Default value for overwrite mode.
31 public final static boolean DEFAULT_OVERWRITE_MODE
= false;
33 * Default value for sub-buffer size for a UST channel.
35 public final static long DEFAULT_SUB_BUFFER_SIZE_UST
= 4096L;
37 * Default value for sub-buffer size for a Kernel channel.
39 public final static long DEFAULT_SUB_BUFFER_SIZE_KERNEL
= 262144L;
41 * Default value for number of sub-buffer a UST channel.
43 public final static int DEFAULT_NUMBER_OF_SUB_BUFFERS_UST
= 8;
45 * Default value for number of sub-buffer a Kernel channel.
47 public final static int DEFAULT_NUMBER_OF_SUB_BUFFERS_KERNEL
= 4;
49 * Default value for number of the switch timer interval.
51 public final static long DEFAULT_SWITCH_TIMER
= 0;
53 * Default value for number of the read timer interval.
55 public final static long DEFAULT_READ_TIMER
= 200;
58 * @return the overwrite mode value.
60 public boolean isOverwriteMode();
62 * Sets the overwrite mode value to the given mode.
63 * @param mode - mode to set.
65 public void setOverwriteMode(boolean mode
);
68 * @return the sub-buffer size.
70 public long getSubBufferSize();
72 * Sets the sub-buffer size to the given value.
73 * @param bufferSize - size to set to set.
75 public void setSubBufferSize(long bufferSize
);
78 * @return the number of sub-buffers.
80 public int getNumberOfSubBuffers();
82 * Sets the number of sub-buffers to the given value.
83 * @param numberOfSubBuffers - value to set.
85 public void setNumberOfSubBuffers(int numberOfSubBuffers
);
88 * @return the switch timer interval.
90 public long getSwitchTimer();
92 * Sets the switch timer interval to the given value.
93 * @param timer - timer value to set.
95 public void setSwitchTimer(long timer
);
98 * @return the read timer interval.
100 public long getReadTimer();
102 * Sets the read timer interval to the given value.
103 * @param timer - timer value to set..
105 public void setReadTimer(long timer
);
108 * @return the output type.
110 public String
getOutputType();
112 * Sets the output type to the given value.
113 * @param type - type to set.
115 public void setOutputType(String type
);
118 * @return the channel state (enabled or disabled).
120 public TraceEnablement
getState();
122 * Sets the channel state (enablement) to the given value.
123 * @param state - state to set.
125 public void setState(TraceEnablement state
);
127 * Sets the channel state (enablement) to the value specified by the given name.
128 * @param stateName - state to set.
130 public void setState(String stateName
);
133 * @return all event information as array.
135 public IEventInfo
[] getEvents();
137 * Sets the event information specified by given list.
138 * @param events - all event information to set.
140 public void setEvents(List
<IEventInfo
> events
);
142 * Adds a single event information.
143 * @param event - event information to add.
145 public void addEvent(IEventInfo event
);