| 1 | /********************************************************************** |
| 2 | * Copyright (c) 2012, 2013 Ericsson |
| 3 | * |
| 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 |
| 8 | * |
| 9 | * Contributors: |
| 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; |
| 14 | |
| 15 | import java.util.List; |
| 16 | |
| 17 | import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType; |
| 18 | |
| 19 | /** |
| 20 | * <p> |
| 21 | * Interface for retrieval of trace channel information. |
| 22 | * </p> |
| 23 | * |
| 24 | * @author Bernd Hufmann |
| 25 | */ |
| 26 | public interface IChannelInfo extends ITraceInfo { |
| 27 | |
| 28 | // ------------------------------------------------------------------------ |
| 29 | // Constants |
| 30 | // ------------------------------------------------------------------------ |
| 31 | /** |
| 32 | * Default value for overwrite mode. |
| 33 | */ |
| 34 | public final static boolean DEFAULT_OVERWRITE_MODE = false; |
| 35 | |
| 36 | /** |
| 37 | * @return the overwrite mode value. |
| 38 | */ |
| 39 | boolean isOverwriteMode(); |
| 40 | /** |
| 41 | * Sets the overwrite mode value to the given mode. |
| 42 | * @param mode - mode to set. |
| 43 | */ |
| 44 | void setOverwriteMode(boolean mode); |
| 45 | |
| 46 | /** |
| 47 | * @return the sub-buffer size. |
| 48 | */ |
| 49 | long getSubBufferSize(); |
| 50 | /** |
| 51 | * Sets the sub-buffer size to the given value. |
| 52 | * @param bufferSize - size to set to set. |
| 53 | */ |
| 54 | void setSubBufferSize(long bufferSize); |
| 55 | |
| 56 | /** |
| 57 | * @return the number of sub-buffers. |
| 58 | */ |
| 59 | int getNumberOfSubBuffers(); |
| 60 | /** |
| 61 | * Sets the number of sub-buffers to the given value. |
| 62 | * @param numberOfSubBuffers - value to set. |
| 63 | */ |
| 64 | void setNumberOfSubBuffers(int numberOfSubBuffers); |
| 65 | |
| 66 | /** |
| 67 | * @return the switch timer interval. |
| 68 | */ |
| 69 | long getSwitchTimer(); |
| 70 | /** |
| 71 | * Sets the switch timer interval to the given value. |
| 72 | * @param timer - timer value to set. |
| 73 | */ |
| 74 | void setSwitchTimer(long timer); |
| 75 | |
| 76 | /** |
| 77 | * @return the read timer interval. |
| 78 | */ |
| 79 | long getReadTimer(); |
| 80 | /** |
| 81 | * Sets the read timer interval to the given value. |
| 82 | * @param timer - timer value to set.. |
| 83 | */ |
| 84 | void setReadTimer(long timer); |
| 85 | |
| 86 | /** |
| 87 | * @return the output type. |
| 88 | */ |
| 89 | TraceChannelOutputType getOutputType(); |
| 90 | /** |
| 91 | * Sets the output type to the given value. |
| 92 | * @param type - type to set. |
| 93 | */ |
| 94 | void setOutputType(String type); |
| 95 | /** |
| 96 | * Sets the output type to the given value. |
| 97 | * @param type - type to set. |
| 98 | */ |
| 99 | void setOutputType(TraceChannelOutputType type); |
| 100 | |
| 101 | /** |
| 102 | * @return the channel state (enabled or disabled). |
| 103 | */ |
| 104 | TraceEnablement getState(); |
| 105 | /** |
| 106 | * Sets the channel state (enablement) to the given value. |
| 107 | * @param state - state to set. |
| 108 | */ |
| 109 | void setState(TraceEnablement state); |
| 110 | /** |
| 111 | * Sets the channel state (enablement) to the value specified by the given name. |
| 112 | * @param stateName - state to set. |
| 113 | */ |
| 114 | void setState(String stateName); |
| 115 | |
| 116 | /** |
| 117 | * @return all event information as array. |
| 118 | */ |
| 119 | IEventInfo[] getEvents(); |
| 120 | /** |
| 121 | * Sets the event information specified by given list. |
| 122 | * @param events - all event information to set. |
| 123 | */ |
| 124 | void setEvents(List<IEventInfo> events); |
| 125 | /** |
| 126 | * Adds a single event information. |
| 127 | * @param event - event information to add. |
| 128 | */ |
| 129 | void addEvent(IEventInfo event); |
| 130 | /** |
| 131 | * Sets the maximum size of trace files |
| 132 | * @param maxSizeTraceFiles - maximum size |
| 133 | */ |
| 134 | void setMaxSizeTraceFiles(int maxSizeTraceFiles); |
| 135 | /** |
| 136 | * Sets the maximum number of trace files |
| 137 | * @param maxNumberTraceFiles - maximum number |
| 138 | */ |
| 139 | void setMaxNumberTraceFiles(int maxNumberTraceFiles); |
| 140 | /** |
| 141 | * @return maximum size of trace files |
| 142 | */ |
| 143 | int getMaxSizeTraceFiles(); |
| 144 | /** |
| 145 | * @return maximum number of trace files |
| 146 | */ |
| 147 | int getMaxNumberTraceFiles(); |
| 148 | /** |
| 149 | * Sets per UID buffers |
| 150 | * @param buffersUID - enable or not |
| 151 | */ |
| 152 | void setBufferType(BufferType buffersUID); |
| 153 | /** |
| 154 | * @return the value of buffersUID (enable or not) |
| 155 | */ |
| 156 | BufferType getBufferType(); |
| 157 | } |