File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\jmx\DatabaseInfoMBean.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.jmx;
8
9 /**
10 * Information and management operations for the given database.
11 * @h2.resource
12 *
13 * @author Eric Dong
14 * @author Thomas Mueller
15 */
16 public interface DatabaseInfoMBean {
17
18 /**
19 * Is the database open in exclusive mode?
20 * @h2.resource
21 *
22 * @return true if the database is open in exclusive mode, false otherwise
23 */
24 boolean isExclusive();
25
26 /**
27 * Is the database read-only?
28 * @h2.resource
29 *
30 * @return true if the database is read-only, false otherwise
31 */
32 boolean isReadOnly();
33
34 /**
35 * The database compatibility mode (REGULAR if no compatibility mode is
36 * used).
37 * @h2.resource
38 *
39 * @return the database mode
40 */
41 String getMode();
42
43 /**
44 * Is multi-threading enabled?
45 * @h2.resource
46 *
47 * @return true if multi-threading is enabled, false otherwise
48 */
49 boolean isMultiThreaded();
50
51 /**
52 * Is MVCC (multi version concurrency) enabled?
53 * @h2.resource
54 *
55 * @return true if MVCC is enabled, false otherwise
56 */
57 boolean isMvcc();
58
59 /**
60 * The transaction log mode (0 disabled, 1 without sync, 2 enabled).
61 * @h2.resource
62 *
63 * @return the transaction log mode
64 */
65 int getLogMode();
66
67 /**
68 * Set the transaction log mode.
69 *
70 * @param value the new log mode
71 */
72 void setLogMode(int value);
73
74 /**
75 * The number of write operations since the database was created.
76 * @h2.resource
77 *
78 * @return the total write count
79 */
80 long getFileWriteCountTotal();
81
82 /**
83 * The number of write operations since the database was opened.
84 * @h2.resource
85 *
86 * @return the write count
87 */
88 long getFileWriteCount();
89
90 /**
91 * The file read count since the database was opened.
92 * @h2.resource
93 *
94 * @return the read count
95 */
96 long getFileReadCount();
97
98 /**
99 * The database file size in KB.
100 * @h2.resource
101 *
102 * @return the number of pages
103 */
104 long getFileSize();
105
106 /**
107 * The maximum cache size in KB.
108 * @h2.resource
109 *
110 * @return the maximum size
111 */
112 int getCacheSizeMax();
113
114 /**
115 * Change the maximum size.
116 *
117 * @param kb the cache size in KB.
118 */
119 void setCacheSizeMax(int kb);
120
121 /**
122 * The current cache size in KB.
123 * @h2.resource
124 *
125 * @return the current size
126 */
127 int getCacheSize();
128
129 /**
130 * The database version.
131 * @h2.resource
132 *
133 * @return the version
134 */
135 String getVersion();
136
137 /**
138 * The trace level (0 disabled, 1 error, 2 info, 3 debug).
139 * @h2.resource
140 *
141 * @return the level
142 */
143 int getTraceLevel();
144
145 /**
146 * Set the trace level.
147 *
148 * @param level the new value
149 */
150 void setTraceLevel(int level);
151
152 /**
153 * List the database settings.
154 * @h2.resource
155 *
156 * @return the database settings
157 */
158 String listSettings();
159
160 /**
161 * List sessions, including the queries that are in
162 * progress, and locked tables.
163 * @h2.resource
164 *
165 * @return information about the sessions
166 */
167 String listSessions();
168
169 }
170