KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > dyade > aaa > util > NTransactionMBean


1 /*
2  * Copyright (C) 2005 ScalAgent Distributed Technologies
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17  * USA.
18  *
19  * Initial developer(s): ScalAgent Distributed Technologies
20  * Contributor(s):
21  */

22 package fr.dyade.aaa.util;
23
24 public interface NTransactionMBean extends TransactionMBean {
25   /**
26    * Returns the initial capacity of global in memory log (by default 4096).
27    *
28    * @return The initial capacity of global in memory log.
29    */

30   int getLogMemoryCapacity();
31
32   /**
33    * Returns the maximum size of memory log in Kb, by default 2048Kb.
34    *
35    * @return The maximum size of memory log in Kb.
36    */

37   public int getMaxLogMemorySize();
38
39   /**
40    * Sets the maximum size of memory log in Kb.
41    *
42    * @param size The maximum size of memory log in Kb.
43    */

44   public void setMaxLogMemorySize(int size);
45
46   /**
47    * Returns the size of memory log in byte.
48    *
49    * @return The size of memory log in byte.
50    */

51   public int getLogMemorySize();
52
53   /**
54    * Returns the size of disk log in Mb, by default 16Mb.
55    *
56    * @return The size of disk log in Mb.
57    */

58   int getLogFileSize();
59
60   /**
61    * Sets the size of disk log in Mb.
62    *
63    * @param size The size of disk log in Mb.
64    */

65   void setLogFileSize(int size);
66
67   /**
68    * Returns the pool size for <code>operation</code> objects, by default 1000.
69    *
70    * @return The pool size for <code>operation</code> objects.
71    */

72   int getLogThresholdOperation();
73
74   /**
75    * Returns the number of commit operation since starting up.
76    *
77    * @return The number of commit operation.
78    */

79   public int getCommitCount();
80
81   /**
82    * Returns the number of garbage operation since starting up.
83    *
84    * @return The number of garbage operation.
85    */

86   public int getGarbageCount();
87
88   /**
89    * Returns the starting time.
90    *
91    * @return The starting time.
92    */

93   public long getStartTime();
94
95   /**
96    * Returns the cumulated time of garbage operations.
97    *
98    * @return The cumulated time of garbage operations.
99    */

100   public long getGarbageTime();
101
102   /**
103    * Returns the ratio of garbage operations since starting up.
104    *
105    * @return The ratio of garbage operations since starting up.
106    */

107   public int getGarbageRatio();
108
109   /**
110    * Returns the maximum time between two garbages, 0 if disable.
111    *
112    * @return The maximum time between two garbages (seconds).
113    */

114   int getGarbageDelay();
115
116   /**
117    * Sets the maximum time between two garbages, 0 to disable the
118    * asynchronous garbage mechanism.
119    *
120    * @param timeout The maximum time between two garbages (seconds).
121    */

122   void setGarbageDelay(int timeout);
123
124   /**
125    * Sets asynchronous garbage.
126    *
127    * @param async If true activates the asynchronous garbage,
128    * deasctivates otherwise.
129    */

130   public void garbageAsync(boolean async);
131
132   /**
133    * Garbage the log file.
134    */

135   public void garbage();
136
137   /**
138    *
139    */

140   public int getPhase();
141
142   public String JavaDoc getPhaseInfo();
143
144   public String JavaDoc getRepositoryImpl();
145
146   /**
147    * Returns the number of save operation to repository.
148    *
149    * @return The number of save operation to repository.
150    */

151   public int getNbSavedObjects();
152
153   /**
154    * Returns the number of delete operation on repository.
155    *
156    * @return The number of delete operation on repository.
157    */

158   public int getNbDeletedObjects();
159
160   /**
161    * Returns the number of useless delete operation on repository.
162    *
163    * @return The number of useless delete operation on repository.
164    */

165   public int getNbBadDeletedObjects();
166
167   /**
168    * Returns the number of load operation from repository.
169    *
170    * @return The number of load operation from repository.
171    */

172   public int getNbLoadedObjects();
173 }
174
Popular Tags