~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/libs/jgdi/src/com/sun/grid/jgdi/monitoring/QueueInstanceSummary.java

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*___INFO__MARK_BEGIN__*/
 
2
/*************************************************************************
 
3
 *
 
4
 *  The Contents of this file are made available subject to the terms of
 
5
 *  the Sun Industry Standards Source License Version 1.2
 
6
 *
 
7
 *  Sun Microsystems Inc., March, 2001
 
8
 *
 
9
 *
 
10
 *  Sun Industry Standards Source License Version 1.2
 
11
 *  =================================================
 
12
 *  The contents of this file are subject to the Sun Industry Standards
 
13
 *  Source License Version 1.2 (the "License"); You may not use this file
 
14
 *  except in compliance with the License. You may obtain a copy of the
 
15
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 
16
 *
 
17
 *  Software provided under this License is provided on an "AS IS" basis,
 
18
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 
19
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 
20
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 
21
 *  See the License for the specific provisions governing your rights and
 
22
 *  obligations concerning the Software.
 
23
 *
 
24
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
25
 *
 
26
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
27
 *
 
28
 *   All Rights Reserved.
 
29
 *
 
30
 ************************************************************************/
 
31
/*___INFO__MARK_END__*/
 
32
package com.sun.grid.jgdi.monitoring;
 
33
 
 
34
import java.util.ArrayList;
 
35
import java.util.Collections;
 
36
import java.util.HashMap;
 
37
import java.util.List;
 
38
import java.util.Map;
 
39
import java.util.Set;
 
40
 
 
41
/**
 
42
 * Implementating classes of this interface represent the results of a
 
43
 * qstat command.
 
44
 *
 
45
 */
 
46
public interface QueueInstanceSummary {
 
47
    /**
 
48
     *  Get the name of the queue instance
 
49
     *  @return name of the queue instance
 
50
     */
 
51
    public String getName();
 
52
    
 
53
    /**
 
54
     *  Get the type of the queue
 
55
     *  @return type of the queue
 
56
     */
 
57
    public String getQueueType();
 
58
    
 
59
    /**
 
60
     *  Get the number of reserved slots.
 
61
     *  @return number of reserved slots
 
62
     */
 
63
    public int getReservedSlots();
 
64
    
 
65
    
 
66
    /**
 
67
     *  Get the number of used slots.
 
68
     *  @return number of used slots
 
69
     */
 
70
    public int getUsedSlots();
 
71
    
 
72
    /**
 
73
     *  Get the number of free slots
 
74
     *  @return number of free slots
 
75
     */
 
76
    public int getFreeSlots();
 
77
    
 
78
    /**
 
79
     *  Get the architecture of the queue instance
 
80
     *  @return architecture of the queue instance
 
81
     */
 
82
    public String getArch();
 
83
    
 
84
    /**
 
85
     *  Get the state of the queue instance
 
86
     *  @return state of the queue instance
 
87
     */
 
88
    public String getState();
 
89
    
 
90
    /**
 
91
     * Get the string representation of the load average
 
92
     *
 
93
     * @return the string representation of the load average
 
94
     */
 
95
    public String getLoadAvgStr();
 
96
    
 
97
    /**
 
98
     * Determine if the queue instance has a load value
 
99
     * @return <code>true</code> if the queue instance has a load value
 
100
     */
 
101
    public boolean hasLoadValue();
 
102
    
 
103
    /**
 
104
     *  Determine if the load value is derived from an object
 
105
     *  @return <code>true</code> if the load value is derived from an object
 
106
     */
 
107
    public boolean isHasLoadValueFromObject();
 
108
    
 
109
    /**
 
110
     *  Get the load average of the queue instance. Return only a meanful
 
111
     *  value if <code>hasHasLoadValue</code> returns <code>true</code>.
 
112
     *
 
113
     *  @return The load average of the queue instance
 
114
     *  @see #hasLoadValue
 
115
     */
 
116
    public double getLoadAvg();
 
117
    
 
118
    /**
 
119
     *  Get the list of jobs which are assigned to the queue instance
 
120
     *  @return list of jobs (instances of {@link JobSummary})
 
121
     */
 
122
    public List<JobSummary> getJobList();
 
123
    
 
124
    /**
 
125
     *  Get the load alarm reason for the queue instance
 
126
     *  @return the load alarm reason
 
127
     */
 
128
    public String getLoadAlarmReason();
 
129
    
 
130
    /**
 
131
     *  Get the suspend alarm reason for the queue instance
 
132
     *  @return the suspend alarm reason
 
133
     */
 
134
    public String getSuspendAlarmReason();
 
135
    
 
136
    /**
 
137
     *  Get the list of explain messages
 
138
     *  @return list of explain messages
 
139
     */
 
140
    public List<String> getExplainMessageList();
 
141
    
 
142
    /**
 
143
     *  Get avaialable dominances for the resource values
 
144
     *  @return set of avaialable dominances
 
145
     */
 
146
    public Set<String> getResourceDominanceSet();
 
147
    
 
148
    /**
 
149
     *  Get all resources names which have the dominane <code>dom</code>
 
150
     *  @return set of resource names
 
151
     */
 
152
    public Set<String> getResourceNames(String dom);
 
153
    
 
154
    /**
 
155
     *  Get a resource value
 
156
     *  @param  dom   dominance of the resource value
 
157
     *  @param  name  name of the resource
 
158
     *  @return the resource value
 
159
     */
 
160
    public String getResourceValue(String dom, String name);
 
161
}