bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / jkstatus / src / share / org / apache / jk / status / JkBalancer.java
1 /*
2  *  Licensed to the Apache Software Foundation (ASF) under one or more
3  *  contributor license agreements.  See the NOTICE file distributed with
4  *  this work for additional information regarding copyright ownership.
5  *  The ASF licenses this file to You under the Apache License, Version 2.0
6  *  (the "License"); you may not use this file except in compliance with
7  *  the License.  You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  */
17 package org.apache.jk.status;
18
19 import java.io.Serializable;
20 import java.util.ArrayList;
21 import java.util.List;
22
23 /**
24  * @author Peter Rossbach
25  * @version $Revision: 500555 $ $Date: 2007-01-27 16:59:41 +0100 (Sat, 27 Jan 2007) $
26  * @see org.apache.jk.status.JkStatusParser
27  */
28 public class JkBalancer implements Serializable {
29
30     int id =-1;
31     String name ;
32     String type ;
33     boolean sticky ;
34     boolean stickyforce;
35     int retries ;
36     int recover ;
37     String method ;
38     String lock ;
39     int good = -1 ;
40     int degraded = -1;
41     int bad = -1 ;
42     int busy = -1;
43     int max_busy = -1 ;
44     int member_count = -1 ;
45     int map_count = -1 ;
46     int time_to_maintenance_min = -1 ;
47     int time_to_maintenance_max = -1 ;
48        
49     List members = new ArrayList() ;
50     List mappings = new ArrayList() ;
51      
52     /**
53      * @return Returns the id.
54      */
55     public int getId() {
56         return id;
57     }
58     /**
59      * @param id The id to set.
60      */
61     public void setId(int id) {
62         this.id = id;
63     }
64     /**
65      * @return Returns the mappings.
66      */
67     public List getBalancerMappings() {
68         return mappings;
69     }
70     /**
71      * @param mappings The mappings to set.
72      */
73     public void setBalancerMappings(List mappings) {
74         this.mappings = mappings;
75     }
76     public void addBalancerMapping(JkBalancerMapping mapping) {
77         mappings.add(mapping);
78     }
79     public void removeBalancerMapping(JkBalancerMapping mapping) {
80         mappings.remove(mapping);
81     }
82     /**
83      * @return Returns the members.
84      */
85     public List getBalancerMembers() {
86         return members;
87     }
88     /**
89      * @param members The members to set.
90      */
91     public void setBalancerMembers(List members) {
92         this.members = members;
93     }
94     public void addBalancerMember(JkBalancerMember member) {
95         members.add(member);
96     }   
97     public void removeBalancerMember(JkBalancerMember member) {
98         members.remove(member);
99     }   
100     /**
101      * @return Returns the name.
102      */
103     public String getName() {
104         return name;
105     }
106     /**
107      * @param name The name to set.
108      */
109     public void setName(String name) {
110         this.name = name;
111     }
112     /**
113      * @return Returns the recover.
114      */
115     public int getRecover_time() {
116         return recover;
117     }
118     /**
119      * @param recover The recover to set.
120      */
121     public void setRecover_time(int recover) {
122         this.recover = recover;
123     }
124     /**
125      * @return Returns the retries.
126      */
127     public int getRetries() {
128         return retries;
129     }
130     /**
131      * @param retries The retries to set.
132      */
133     public void setRetries(int retries) {
134         this.retries = retries;
135     }
136     /**
137      * @return Returns the sticky.
138      */
139     public boolean isSticky_session() {
140         return sticky;
141     }
142     /**
143      * @param sticky The sticky to set.
144      */
145     public void setSticky_session(boolean sticky) {
146         this.sticky = sticky;
147     }
148     /**
149      * @return Returns the stickyforce.
150      */
151     public boolean isSticky_session_force() {
152         return stickyforce;
153     }
154     /**
155      * @param stickyforce The stickyforce to set.
156      */
157     public void setSticky_session_force(boolean stickyforce) {
158         this.stickyforce = stickyforce;
159     }
160     /**
161      * @return Returns the type.
162      */
163     public String getType() {
164         return type;
165     }
166     /**
167      * @param type The type to set.
168      */
169     public void setType(String type) {
170         this.type = type;
171     }
172     /**
173      * @return the bad
174      * @since mod_jk 1.2.20
175      */
176     public int getBad() {
177         return bad;
178     }
179     /**
180      * @param bad the bad to set
181      * @since mod_jk 1.2.20
182      */
183     public void setBad(int bad) {
184         this.bad = bad;
185     }
186     /**
187      * @return the busy
188      * @since mod_jk 1.2.20
189      */
190     public int getBusy() {
191         return busy;
192     }
193     /**
194      * @param busy the busy to set
195      * @since mod_jk 1.2.20
196      */
197     public void setBusy(int busy) {
198         this.busy = busy;
199     }
200     /**
201      * @return the degraded
202      * @since mod_jk 1.2.20
203      */
204     public int getDegraded() {
205         return degraded;
206     }
207     /**
208      * @param degraded the degraded to set
209      * @since mod_jk 1.2.20
210      */
211     public void setDegraded(int degraded) {
212         this.degraded = degraded;
213     }
214     /**
215      * @return the good
216      * @since mod_jk 1.2.20
217      */
218     public int getGood() {
219         return good;
220     }
221     /**
222      * @param good the good to set
223      * @since mod_jk 1.2.20
224      */
225     public void setGood(int good) {
226         this.good = good;
227     }
228     /**
229      * @return the lock
230      * @since mod_jk 1.2.20
231      */
232     public String getLock() {
233         return lock;
234     }
235     /**
236      * @param lock the lock to set
237      * @since mod_jk 1.2.20
238      */
239     public void setLock(String lock) {
240         this.lock = lock;
241     }
242     /**
243      * @return the max_busy
244      * @since mod_jk 1.2.20
245      */
246     public int getMax_busy() {
247         return max_busy;
248     }
249     /**
250      * @param max_busy the max_busy to set
251      * @since mod_jk 1.2.20
252      */
253     public void setMax_busy(int max_busy) {
254         this.max_busy = max_busy;
255     }
256     /**
257      * @return the method
258      * @since mod_jk 1.2.20
259      */
260     public String getMethod() {
261         return method;
262     }
263     /**
264      * @param method the method to set
265      * @since mod_jk 1.2.20
266      */
267     public void setMethod(String method) {
268         this.method = method;
269     }
270     
271     /**
272      * @return the member_count
273      * @since mod_jk 1.2.20
274      */
275     public int getMember_count() {
276         return member_count;
277     }
278     
279     /**
280      * @param member_count the member_count to set
281      * @since mod_jk 1.2.20
282      */
283     public void setMember_count(int member_count) {
284         this.member_count = member_count;
285     }
286     
287     /**
288      * @return the map_count
289      * @since mod_jk 1.2.20
290      */
291     public int getMap_count() {
292         return map_count;
293     }
294
295     /**
296      * @param map_count the map_count to set
297      * @since mod_jk 1.2.20
298      */
299     public void setMap_count(int map_count) {
300         this.map_count = map_count;
301     }
302     
303     /**
304      * @return the time_to_maintenance_min
305      * @since mod_jk 1.2.21
306      */
307     public int getTime_to_maintenance_min() {
308         return time_to_maintenance_min;
309     }
310
311     /**
312      * @param time_to_maintenance_min the time_to_maintenance_min to set
313      * @since mod_jk 1.2.21
314      */
315     public void setTime_to_maintenance_min(int time_to_maintenance_min) {
316         this.time_to_maintenance_min = time_to_maintenance_min;
317     }
318     
319     /**
320      * @return the time_to_maintenance_max
321      * @since mod_jk 1.2.21
322      */
323     public int getTime_to_maintenance_max() {
324         return time_to_maintenance_max;
325     }
326
327     /**
328      * @param time_to_maintenance_max the time_to_maintenance_max to set
329      * @since mod_jk 1.2.21
330      */
331     public void setTime_to_maintenance_max(int time_to_maintenance_max) {
332         this.time_to_maintenance_max = time_to_maintenance_max;
333     }
334     
335 }