summaryrefslogtreecommitdiffstats
path: root/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/src/share/org/apache/jk/status/JkBalancer.java
blob: f9e4f7ad0f4f8d3079053df8e21cda25b87f4c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
/*
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.apache.jk.status;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Peter Rossbach
 * @version $Revision: 500555 $ $Date: 2007-01-27 16:59:41 +0100 (Sat, 27 Jan 2007) $
 * @see org.apache.jk.status.JkStatusParser
 */
public class JkBalancer implements Serializable {

    int id =-1;
    String name ;
    String type ;
    boolean sticky ;
    boolean stickyforce;
    int retries ;
    int recover ;
    String method ;
    String lock ;
    int good = -1 ;
    int degraded = -1;
    int bad = -1 ;
    int busy = -1;
    int max_busy = -1 ;
    int member_count = -1 ;
    int map_count = -1 ;
    int time_to_maintenance_min = -1 ;
    int time_to_maintenance_max = -1 ;
       
    List members = new ArrayList() ;
    List mappings = new ArrayList() ;
     
    /**
     * @return Returns the id.
     */
    public int getId() {
        return id;
    }
    /**
     * @param id The id to set.
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * @return Returns the mappings.
     */
    public List getBalancerMappings() {
        return mappings;
    }
    /**
     * @param mappings The mappings to set.
     */
    public void setBalancerMappings(List mappings) {
        this.mappings = mappings;
    }
    public void addBalancerMapping(JkBalancerMapping mapping) {
        mappings.add(mapping);
    }
    public void removeBalancerMapping(JkBalancerMapping mapping) {
        mappings.remove(mapping);
    }
    /**
     * @return Returns the members.
     */
    public List getBalancerMembers() {
        return members;
    }
    /**
     * @param members The members to set.
     */
    public void setBalancerMembers(List members) {
        this.members = members;
    }
    public void addBalancerMember(JkBalancerMember member) {
        members.add(member);
    }   
    public void removeBalancerMember(JkBalancerMember member) {
        members.remove(member);
    }   
    /**
     * @return Returns the name.
     */
    public String getName() {
        return name;
    }
    /**
     * @param name The name to set.
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return Returns the recover.
     */
    public int getRecover_time() {
        return recover;
    }
    /**
     * @param recover The recover to set.
     */
    public void setRecover_time(int recover) {
        this.recover = recover;
    }
    /**
     * @return Returns the retries.
     */
    public int getRetries() {
        return retries;
    }
    /**
     * @param retries The retries to set.
     */
    public void setRetries(int retries) {
        this.retries = retries;
    }
    /**
     * @return Returns the sticky.
     */
    public boolean isSticky_session() {
        return sticky;
    }
    /**
     * @param sticky The sticky to set.
     */
    public void setSticky_session(boolean sticky) {
        this.sticky = sticky;
    }
    /**
     * @return Returns the stickyforce.
     */
    public boolean isSticky_session_force() {
        return stickyforce;
    }
    /**
     * @param stickyforce The stickyforce to set.
     */
    public void setSticky_session_force(boolean stickyforce) {
        this.stickyforce = stickyforce;
    }
    /**
     * @return Returns the type.
     */
    public String getType() {
        return type;
    }
    /**
     * @param type The type to set.
     */
    public void setType(String type) {
        this.type = type;
    }
    /**
     * @return the bad
     * @since mod_jk 1.2.20
     */
    public int getBad() {
        return bad;
    }
    /**
     * @param bad the bad to set
     * @since mod_jk 1.2.20
     */
    public void setBad(int bad) {
        this.bad = bad;
    }
    /**
     * @return the busy
     * @since mod_jk 1.2.20
     */
    public int getBusy() {
        return busy;
    }
    /**
     * @param busy the busy to set
     * @since mod_jk 1.2.20
     */
    public void setBusy(int busy) {
        this.busy = busy;
    }
    /**
     * @return the degraded
     * @since mod_jk 1.2.20
     */
    public int getDegraded() {
        return degraded;
    }
    /**
     * @param degraded the degraded to set
     * @since mod_jk 1.2.20
     */
    public void setDegraded(int degraded) {
        this.degraded = degraded;
    }
    /**
     * @return the good
     * @since mod_jk 1.2.20
     */
    public int getGood() {
        return good;
    }
    /**
     * @param good the good to set
     * @since mod_jk 1.2.20
     */
    public void setGood(int good) {
        this.good = good;
    }
    /**
     * @return the lock
     * @since mod_jk 1.2.20
     */
    public String getLock() {
        return lock;
    }
    /**
     * @param lock the lock to set
     * @since mod_jk 1.2.20
     */
    public void setLock(String lock) {
        this.lock = lock;
    }
    /**
     * @return the max_busy
     * @since mod_jk 1.2.20
     */
    public int getMax_busy() {
        return max_busy;
    }
    /**
     * @param max_busy the max_busy to set
     * @since mod_jk 1.2.20
     */
    public void setMax_busy(int max_busy) {
        this.max_busy = max_busy;
    }
    /**
     * @return the method
     * @since mod_jk 1.2.20
     */
    public String getMethod() {
        return method;
    }
    /**
     * @param method the method to set
     * @since mod_jk 1.2.20
     */
    public void setMethod(String method) {
        this.method = method;
    }
    
    /**
     * @return the member_count
     * @since mod_jk 1.2.20
     */
    public int getMember_count() {
        return member_count;
    }
    
    /**
     * @param member_count the member_count to set
     * @since mod_jk 1.2.20
     */
    public void setMember_count(int member_count) {
        this.member_count = member_count;
    }
    
    /**
     * @return the map_count
     * @since mod_jk 1.2.20
     */
    public int getMap_count() {
        return map_count;
    }

    /**
     * @param map_count the map_count to set
     * @since mod_jk 1.2.20
     */
    public void setMap_count(int map_count) {
        this.map_count = map_count;
    }
    
    /**
     * @return the time_to_maintenance_min
     * @since mod_jk 1.2.21
     */
    public int getTime_to_maintenance_min() {
        return time_to_maintenance_min;
    }

    /**
     * @param time_to_maintenance_min the time_to_maintenance_min to set
     * @since mod_jk 1.2.21
     */
    public void setTime_to_maintenance_min(int time_to_maintenance_min) {
        this.time_to_maintenance_min = time_to_maintenance_min;
    }
    
    /**
     * @return the time_to_maintenance_max
     * @since mod_jk 1.2.21
     */
    public int getTime_to_maintenance_max() {
        return time_to_maintenance_max;
    }

    /**
     * @param time_to_maintenance_max the time_to_maintenance_max to set
     * @since mod_jk 1.2.21
     */
    public void setTime_to_maintenance_max(int time_to_maintenance_max) {
        this.time_to_maintenance_max = time_to_maintenance_max;
    }
    
}