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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.apache.jk.status;
19 import java.io.Serializable;
20 import java.util.ArrayList;
21 import java.util.List;
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
28 public class JkBalancer implements Serializable {
44 int member_count = -1 ;
46 int time_to_maintenance_min = -1 ;
47 int time_to_maintenance_max = -1 ;
49 List members = new ArrayList() ;
50 List mappings = new ArrayList() ;
53 * @return Returns the id.
59 * @param id The id to set.
61 public void setId(int id) {
65 * @return Returns the mappings.
67 public List getBalancerMappings() {
71 * @param mappings The mappings to set.
73 public void setBalancerMappings(List mappings) {
74 this.mappings = mappings;
76 public void addBalancerMapping(JkBalancerMapping mapping) {
77 mappings.add(mapping);
79 public void removeBalancerMapping(JkBalancerMapping mapping) {
80 mappings.remove(mapping);
83 * @return Returns the members.
85 public List getBalancerMembers() {
89 * @param members The members to set.
91 public void setBalancerMembers(List members) {
92 this.members = members;
94 public void addBalancerMember(JkBalancerMember member) {
97 public void removeBalancerMember(JkBalancerMember member) {
98 members.remove(member);
101 * @return Returns the name.
103 public String getName() {
107 * @param name The name to set.
109 public void setName(String name) {
113 * @return Returns the recover.
115 public int getRecover_time() {
119 * @param recover The recover to set.
121 public void setRecover_time(int recover) {
122 this.recover = recover;
125 * @return Returns the retries.
127 public int getRetries() {
131 * @param retries The retries to set.
133 public void setRetries(int retries) {
134 this.retries = retries;
137 * @return Returns the sticky.
139 public boolean isSticky_session() {
143 * @param sticky The sticky to set.
145 public void setSticky_session(boolean sticky) {
146 this.sticky = sticky;
149 * @return Returns the stickyforce.
151 public boolean isSticky_session_force() {
155 * @param stickyforce The stickyforce to set.
157 public void setSticky_session_force(boolean stickyforce) {
158 this.stickyforce = stickyforce;
161 * @return Returns the type.
163 public String getType() {
167 * @param type The type to set.
169 public void setType(String type) {
174 * @since mod_jk 1.2.20
176 public int getBad() {
180 * @param bad the bad to set
181 * @since mod_jk 1.2.20
183 public void setBad(int bad) {
188 * @since mod_jk 1.2.20
190 public int getBusy() {
194 * @param busy the busy to set
195 * @since mod_jk 1.2.20
197 public void setBusy(int busy) {
201 * @return the degraded
202 * @since mod_jk 1.2.20
204 public int getDegraded() {
208 * @param degraded the degraded to set
209 * @since mod_jk 1.2.20
211 public void setDegraded(int degraded) {
212 this.degraded = degraded;
216 * @since mod_jk 1.2.20
218 public int getGood() {
222 * @param good the good to set
223 * @since mod_jk 1.2.20
225 public void setGood(int good) {
230 * @since mod_jk 1.2.20
232 public String getLock() {
236 * @param lock the lock to set
237 * @since mod_jk 1.2.20
239 public void setLock(String lock) {
243 * @return the max_busy
244 * @since mod_jk 1.2.20
246 public int getMax_busy() {
250 * @param max_busy the max_busy to set
251 * @since mod_jk 1.2.20
253 public void setMax_busy(int max_busy) {
254 this.max_busy = max_busy;
258 * @since mod_jk 1.2.20
260 public String getMethod() {
264 * @param method the method to set
265 * @since mod_jk 1.2.20
267 public void setMethod(String method) {
268 this.method = method;
272 * @return the member_count
273 * @since mod_jk 1.2.20
275 public int getMember_count() {
280 * @param member_count the member_count to set
281 * @since mod_jk 1.2.20
283 public void setMember_count(int member_count) {
284 this.member_count = member_count;
288 * @return the map_count
289 * @since mod_jk 1.2.20
291 public int getMap_count() {
296 * @param map_count the map_count to set
297 * @since mod_jk 1.2.20
299 public void setMap_count(int map_count) {
300 this.map_count = map_count;
304 * @return the time_to_maintenance_min
305 * @since mod_jk 1.2.21
307 public int getTime_to_maintenance_min() {
308 return time_to_maintenance_min;
312 * @param time_to_maintenance_min the time_to_maintenance_min to set
313 * @since mod_jk 1.2.21
315 public void setTime_to_maintenance_min(int time_to_maintenance_min) {
316 this.time_to_maintenance_min = time_to_maintenance_min;
320 * @return the time_to_maintenance_max
321 * @since mod_jk 1.2.21
323 public int getTime_to_maintenance_max() {
324 return time_to_maintenance_max;
328 * @param time_to_maintenance_max the time_to_maintenance_max to set
329 * @since mod_jk 1.2.21
331 public void setTime_to_maintenance_max(int time_to_maintenance_max) {
332 this.time_to_maintenance_max = time_to_maintenance_max;