(no commit message)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng / src / org / eclipse / linuxtools / lttng / state / resource / ILTTngStateResource.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.linuxtools.lttng.state.resource;
13
14 import org.eclipse.linuxtools.lttng.model.ILTTngTreeNode;
15
16 /**
17 * @author alvaro
18 *
19 */
20 public interface ILTTngStateResource<E extends ILTTngStateResource<E>> extends
21 ILTTngTreeNode<E> {
22
23 // ========================================================================
24 // Interface methods
25 // =======================================================================
26 /**
27 * @return
28 */
29 public GlobalStateMode getStateMode();
30
31 /**
32 * @return
33 */
34 public ILttngStateContext getContext();
35
36 // ========================================================================
37 // Interface Enums
38 // =======================================================================
39 /**
40 * <p>
41 * Represents the specific type of resources known by the application
42 * </p>
43 *
44 */
45 public enum ResourceType {
46 LTT_RESOURCE_PROCESS("process"), /* */
47 LTT_RESOURCE_CPU("cpu"), /* */
48 LTT_RESOURCE_BDEV("bdev"), /* */
49 LTT_RESOURCE_IRQ("irq"), /* */
50 LTT_RESOURCE_SOFTIRQ("softIrq"), /* */
51 LTT_RESOURCE_TRAP("trap"), /* */
52 LTT_RESOURCE_RUNNING_PROCESS("running"); /* */
53
54 String inName;
55
56 private ResourceType(String name) {
57 this.inName = name;
58 }
59
60 public String getInName() {
61 return this.inName;
62 }
63 }
64
65 /**
66 * <p>unifies the possible states of the state resources known by the application</p>
67 *
68 */
69 public enum GlobalStateMode {
70 LTT_STATEMODE_UNNAMED("unnamed"), /* */
71 LTT_STATEMODE_UNKNOWN("unknown"), /* */
72 LTT_STATEMODE_IDLE("idle"), /* */
73 LTT_STATEMODE_BUSY("busy"), /* */
74 LTT_STATEMODE_PENDING("pending"), /* */
75 LTT_STATEMODE_READING("reading"), /* */
76 LTT_STATEMODE_WRITING("writing"), /* */
77 LTT_STATEMODE_IRQ("irq"), /* */
78 LTT_STATEMODE_SOFTIRQ("softirq"), /* */
79 LTT_STATEMODE_TRAP("trap"), /* */
80 LTT_STATEMODE_WAIT_FORK("waitfork"), /* */
81 LTT_STATEMODE_WAIT_CPU("waitcpu"), /* */
82 LTT_STATEMODE_EXIT("exit"), /* */
83 LTT_STATEMODE_ZOMBIE("zombie"), /* */
84 LTT_STATEMODE_WAIT_IO("waitio"), /* */
85 LTT_STATEMODE_RUN("run"), /* */
86 LTT_STATEMODE_DEAD("dead"), /* */
87 LTT_STATEMODE_USER_MODE("usermode"), /* */
88 LTT_STATEMODE_SYSCALL("syscall"); /* */
89
90
91 String inName;
92
93 private GlobalStateMode(String name) {
94 this.inName = name;
95 }
96
97 public String getInName() {
98 return this.inName;
99 }
100 }
101
102 }
This page took 0.033562 seconds and 5 git commands to generate.