KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > common > jmx > monitoring > backend > BackendStatistics


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: sequoia@continuent.org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * Initial developer(s): Emmanuel Cecchet.
20  * Contributor(s): ______________________.
21  */

22
23 package org.continuent.sequoia.common.jmx.monitoring.backend;
24
25 import java.io.Serializable JavaDoc;
26
27 /**
28  * This class defines a BackendStatistics
29  *
30  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>
31  */

32 public class BackendStatistics implements Serializable JavaDoc
33 {
34   private static final long serialVersionUID = 586357005726124555L;
35
36   /**
37    * Name of the backend
38    */

39   private String JavaDoc backendName;
40
41   /**
42    * Class name of the driver for the backend
43    */

44   private String JavaDoc driverClassName;
45   /**
46    * URL of the backend
47    */

48   private String JavaDoc url;
49   /**
50    * Is the backend enable for read?
51    */

52   private boolean readEnabled;
53   /**
54    * Is the backend enable for write?
55    */

56   private boolean writeEnabled;
57   /**
58    * the status of the initialization
59    */

60   private String JavaDoc initializationStatus;
61   /**
62    * number of total active connections
63    */

64   private long numberOfTotalActiveConnections;
65   /**
66    * Last known checkpoint of the backend
67    */

68   private String JavaDoc lastKnownCheckpoint;
69   /**
70    * Number of active transactions
71    */

72   private int numberOfActiveTransactions;
73   /**
74    * Number of pending requests
75    */

76   private int numberOfPendingRequests;
77   /**
78    * Number of persistent connections
79    */

80   private int numberOfPersistentConnections;
81   /**
82    * Number of connection managers
83    */

84   private int numberOfConnectionManagers;
85   /**
86    * Number of total requests
87    */

88   private int numberOfTotalRequests;
89   /**
90    * Number of total transactions
91    */

92   private int numberOfTotalTransactions;
93
94   /**
95    * Returns the backendName value.
96    *
97    * @return Returns the backendName.
98    */

99   public String JavaDoc getBackendName()
100   {
101     return backendName;
102   }
103
104   /**
105    * Sets the backendName value.
106    *
107    * @param backendName The backendName to set.
108    */

109   public void setBackendName(String JavaDoc backendName)
110   {
111     this.backendName = backendName;
112   }
113
114   /**
115    * Returns the driverClassName value.
116    *
117    * @return Returns the driverClassName.
118    */

119   public String JavaDoc getDriverClassName()
120   {
121     return driverClassName;
122   }
123
124   /**
125    * Sets the driverClassName value.
126    *
127    * @param driverClassName The driverClassName to set.
128    */

129   public void setDriverClassName(String JavaDoc driverClassName)
130   {
131     this.driverClassName = driverClassName;
132   }
133
134   /**
135    * Returns the initializationStatus value.
136    *
137    * @return Returns the initializationStatus.
138    */

139   public String JavaDoc getInitializationStatus()
140   {
141     return initializationStatus;
142   }
143
144   /**
145    * Sets the initializationStatus value.
146    *
147    * @param initializationStatus The initializationStatus to set.
148    */

149   public void setInitializationStatus(String JavaDoc initializationStatus)
150   {
151     this.initializationStatus = initializationStatus;
152   }
153
154   /**
155    * Returns the lastKnownCheckpoint value.
156    *
157    * @return Returns the lastKnownCheckpoint.
158    */

159   public String JavaDoc getLastKnownCheckpoint()
160   {
161     return lastKnownCheckpoint;
162   }
163
164   /**
165    * Sets the lastKnownCheckpoint value.
166    *
167    * @param lastKnownCheckpoint The lastKnownCheckpoint to set.
168    */

169   public void setLastKnownCheckpoint(String JavaDoc lastKnownCheckpoint)
170   {
171     this.lastKnownCheckpoint = lastKnownCheckpoint;
172   }
173
174   /**
175    * Returns the numberOfActiveTransactions value.
176    *
177    * @return Returns the numberOfActiveTransactions.
178    */

179   public int getNumberOfActiveTransactions()
180   {
181     return numberOfActiveTransactions;
182   }
183
184   /**
185    * Sets the numberOfActiveTransactions value.
186    *
187    * @param numberOfActiveTransactions The numberOfActiveTransactions to set.
188    */

189   public void setNumberOfActiveTransactions(int numberOfActiveTransactions)
190   {
191     this.numberOfActiveTransactions = numberOfActiveTransactions;
192   }
193
194   /**
195    * Returns the numberOfConnectionManagers value.
196    *
197    * @return Returns the numberOfConnectionManagers.
198    */

199   public int getNumberOfConnectionManagers()
200   {
201     return numberOfConnectionManagers;
202   }
203
204   /**
205    * Sets the numberOfConnectionManagers value.
206    *
207    * @param numberOfConnectionManagers The numberOfConnectionManagers to set.
208    */

209   public void setNumberOfConnectionManagers(int numberOfConnectionManagers)
210   {
211     this.numberOfConnectionManagers = numberOfConnectionManagers;
212   }
213
214   /**
215    * Returns the numberOfPendingRequests value.
216    *
217    * @return Returns the numberOfPendingRequests.
218    */

219   public int getNumberOfPendingRequests()
220   {
221     return numberOfPendingRequests;
222   }
223
224   /**
225    * Sets the numberOfPendingRequests value.
226    *
227    * @param numberOfPendingRequests The numberOfPendingRequests to set.
228    */

229   public void setNumberOfPendingRequests(int numberOfPendingRequests)
230   {
231     this.numberOfPendingRequests = numberOfPendingRequests;
232   }
233
234   /**
235    * Returns the numberOfPersistentConnections value.
236    *
237    * @return Returns the numberOfPersistentConnections.
238    */

239   public final int getNumberOfPersistentConnections()
240   {
241     return numberOfPersistentConnections;
242   }
243
244   /**
245    * Sets the numberOfPersistentConnections value.
246    *
247    * @param numberOfPersistentConnections The numberOfPersistentConnections to
248    * set.
249    */

250   public final void setNumberOfPersistentConnections(
251       int numberOfPersistentConnections)
252   {
253     this.numberOfPersistentConnections = numberOfPersistentConnections;
254   }
255
256   /**
257    * Returns the numberOfTotalActiveConnections value.
258    *
259    * @return Returns the numberOfTotalActiveConnections.
260    */

261   public long getNumberOfTotalActiveConnections()
262   {
263     return numberOfTotalActiveConnections;
264   }
265
266   /**
267    * Sets the numberOfTotalActiveConnections value.
268    *
269    * @param numberOfTotalActiveConnections The numberOfTotalActiveConnections to
270    * set.
271    */

272   public void setNumberOfTotalActiveConnections(
273       long numberOfTotalActiveConnections)
274   {
275     this.numberOfTotalActiveConnections = numberOfTotalActiveConnections;
276   }
277
278   /**
279    * Returns the numberOfTotalRequests value.
280    *
281    * @return Returns the numberOfTotalRequests.
282    */

283   public int getNumberOfTotalRequests()
284   {
285     return numberOfTotalRequests;
286   }
287
288   /**
289    * Sets the numberOfTotalRequests value.
290    *
291    * @param numberOfTotalRequests The numberOfTotalRequests to set.
292    */

293   public void setNumberOfTotalRequests(int numberOfTotalRequests)
294   {
295     this.numberOfTotalRequests = numberOfTotalRequests;
296   }
297
298   /**
299    * Returns the numberOfTotalTransactions value.
300    *
301    * @return Returns the numberOfTotalTransactions.
302    */

303   public int getNumberOfTotalTransactions()
304   {
305     return numberOfTotalTransactions;
306   }
307
308   /**
309    * Sets the numberOfTotalTransactions value.
310    *
311    * @param numberOfTotalTransactions The numberOfTotalTransactions to set.
312    */

313   public void setNumberOfTotalTransactions(int numberOfTotalTransactions)
314   {
315     this.numberOfTotalTransactions = numberOfTotalTransactions;
316   }
317
318   /**
319    * Returns the readEnabled value.
320    *
321    * @return Returns the readEnabled.
322    */

323   public boolean isReadEnabled()
324   {
325     return readEnabled;
326   }
327
328   /**
329    * Sets the readEnabled value.
330    *
331    * @param readEnabled The readEnabled to set.
332    */

333   public void setReadEnabled(boolean readEnabled)
334   {
335     this.readEnabled = readEnabled;
336   }
337
338   /**
339    * Returns the url value.
340    *
341    * @return Returns the url.
342    */

343   public String JavaDoc getUrl()
344   {
345     return url;
346   }
347
348   /**
349    * Sets the url value.
350    *
351    * @param url The url to set.
352    */

353   public void setUrl(String JavaDoc url)
354   {
355     this.url = url;
356   }
357
358   /**
359    * Returns the writeEnabled value.
360    *
361    * @return Returns the writeEnabled.
362    */

363   public boolean isWriteEnabled()
364   {
365     return writeEnabled;
366   }
367
368   /**
369    * Sets the writeEnabled value.
370    *
371    * @param writeEnabled The writeEnabled to set.
372    */

373   public void setWriteEnabled(boolean writeEnabled)
374   {
375     this.writeEnabled = writeEnabled;
376   }
377
378 }
379
Popular Tags