1/*- 2 * Automatically built by dist/s_java_stat. 3 * Only the javadoc comments can be edited. 4 * 5 * See the file LICENSE for redistribution information. 6 * 7 * Copyright (c) 2002,2008 Oracle. All rights reserved. 8 */ 9 10package com.sleepycat.db; 11 12/** 13Lock statistics for a database environment. 14*/ 15public class LockStats { 16 // no public constructor 17 /* package */ LockStats() {} 18 19 private int st_id; 20 /** 21 The last allocated locker ID. 22 */ 23 public int getId() { 24 return st_id; 25 } 26 27 private int st_cur_maxid; 28 public int getCurMaxId() { 29 return st_cur_maxid; 30 } 31 32 private int st_maxlocks; 33 /** 34 The maximum number of locks possible. 35 */ 36 public int getMaxLocks() { 37 return st_maxlocks; 38 } 39 40 private int st_maxlockers; 41 /** 42 The maximum number of lockers possible. 43 */ 44 public int getMaxLockers() { 45 return st_maxlockers; 46 } 47 48 private int st_maxobjects; 49 /** 50 The maximum number of lock objects possible. 51 */ 52 public int getMaxObjects() { 53 return st_maxobjects; 54 } 55 56 private int st_partitions; 57 /** 58 The number of lock table partitions. 59 */ 60 public int getPartitions() { 61 return st_partitions; 62 } 63 64 private int st_nmodes; 65 /** 66 The number of lock modes. 67 */ 68 public int getNumModes() { 69 return st_nmodes; 70 } 71 72 private int st_nlockers; 73 /** 74 The number of current lockers. 75 */ 76 public int getNumLockers() { 77 return st_nlockers; 78 } 79 80 private int st_nlocks; 81 /** 82 The number of current locks. 83 */ 84 public int getNumLocks() { 85 return st_nlocks; 86 } 87 88 private int st_maxnlocks; 89 /** 90 The maximum number of locks at any one time. Note that if there is more than one partition, this is the sum of the maximum across all partitions. 91 */ 92 public int getMaxNlocks() { 93 return st_maxnlocks; 94 } 95 96 private int st_maxhlocks; 97 /** 98 The maximum number of locks in any hash bucket at any one time. 99 */ 100 public int getMaxHlocks() { 101 return st_maxhlocks; 102 } 103 104 private int st_locksteals; 105 /** 106 The maximum number of locks stolen for an empty partition. 107 */ 108 public int getLocksteals() { 109 return st_locksteals; 110 } 111 112 private int st_maxlsteals; 113 /** 114 The maximum number of lock steals for any one partition. 115 */ 116 public int getMaxLsteals() { 117 return st_maxlsteals; 118 } 119 120 private int st_maxnlockers; 121 /** 122 The maximum number of lockers at any one time. 123 */ 124 public int getMaxNlockers() { 125 return st_maxnlockers; 126 } 127 128 private int st_nobjects; 129 /** 130 The number of current lock objects. 131 */ 132 public int getNobjects() { 133 return st_nobjects; 134 } 135 136 private int st_maxnobjects; 137 /** 138 The maximum number of lock objects at any one time. Note that if there is more than one partition this is the sum of the maximum across all partitions. 139 */ 140 public int getMaxNobjects() { 141 return st_maxnobjects; 142 } 143 144 private int st_maxhobjects; 145 /** 146 The maximum number of objects in any hash bucket at any one time. 147 */ 148 public int getMaxHobjects() { 149 return st_maxhobjects; 150 } 151 152 private int st_objectsteals; 153 /** 154 The maximum number of objects stolen for an empty partition. 155 */ 156 public int getObjectsteals() { 157 return st_objectsteals; 158 } 159 160 private int st_maxosteals; 161 /** 162 The maximum number of object steals for any one partition. 163 */ 164 public int getMaxOsteals() { 165 return st_maxosteals; 166 } 167 168 private int st_nrequests; 169 /** 170 The total number of locks requested. 171 */ 172 public int getNumRequests() { 173 return st_nrequests; 174 } 175 176 private int st_nreleases; 177 /** 178 The total number of locks released. 179 */ 180 public int getNumReleases() { 181 return st_nreleases; 182 } 183 184 private int st_nupgrade; 185 /** The total number of locks upgraded. **/ 186 public int getNumUpgrade() { 187 return st_nupgrade; 188 } 189 190 private int st_ndowngrade; 191 /** The total number of locks downgraded. **/ 192 public int getNumDowngrade() { 193 return st_ndowngrade; 194 } 195 196 private int st_lock_wait; 197 /** 198 The number of lock requests not immediately available due to conflicts, 199 for which the thread of control waited. 200 */ 201 public int getLockWait() { 202 return st_lock_wait; 203 } 204 205 private int st_lock_nowait; 206 /** 207 The number of lock requests not immediately available due to conflicts, 208 for which the thread of control did not wait. 209 */ 210 public int getLockNowait() { 211 return st_lock_nowait; 212 } 213 214 private int st_ndeadlocks; 215 /** 216 The number of deadlocks. 217 */ 218 public int getNumDeadlocks() { 219 return st_ndeadlocks; 220 } 221 222 private int st_locktimeout; 223 /** 224 Lock timeout value. 225 */ 226 public int getLockTimeout() { 227 return st_locktimeout; 228 } 229 230 private int st_nlocktimeouts; 231 /** 232 The number of lock requests that have timed out. 233 */ 234 public int getNumLockTimeouts() { 235 return st_nlocktimeouts; 236 } 237 238 private int st_txntimeout; 239 /** 240 Transaction timeout value. 241 */ 242 public int getTxnTimeout() { 243 return st_txntimeout; 244 } 245 246 private int st_ntxntimeouts; 247 /** 248 The number of transactions that have timed out. This value is also 249 a component of st_ndeadlocks, the total number of deadlocks detected. 250 */ 251 public int getNumTxnTimeouts() { 252 return st_ntxntimeouts; 253 } 254 255 private int st_part_wait; 256 /** 257 The number of times that a thread of control was forced to wait before 258 obtaining a lock partition mutex. 259 * */ 260 public int getPartWait() { 261 return st_part_wait; 262 } 263 264 private int st_part_nowait; 265 /** 266 The number of times that a thread of control was able to obtain a lock 267 partition mutex without waiting. 268 * */ 269 public int getPartNowait() { 270 return st_part_nowait; 271 } 272 273 private int st_part_max_wait; 274 /** 275 The maximum number of times that a thread of control was forced to wait 276 before obtaining any one lock partition mutex. 277 * */ 278 public int getPartMaxWait() { 279 return st_part_max_wait; 280 } 281 282 private int st_part_max_nowait; 283 /** 284 The number of times that a thread of control was able to obtain any one 285 lock partition mutex without waiting. 286 * */ 287 public int getPartMaxNowait() { 288 return st_part_max_nowait; 289 } 290 291 private int st_objs_wait; 292 /** 293 The number of requests to allocate or deallocate an object for which the 294 thread of control waited. 295 */ 296 public int getObjsWait() { 297 return st_objs_wait; 298 } 299 300 private int st_objs_nowait; 301 /** 302 The number of requests to allocate or deallocate an object for which the 303 thread of control did not wait. 304 */ 305 public int getObjsNowait() { 306 return st_objs_nowait; 307 } 308 309 private int st_lockers_wait; 310 /** 311 The number of requests to allocate or deallocate a locker for which the 312 thread of control waited. 313 */ 314 public int getLockersWait() { 315 return st_lockers_wait; 316 } 317 318 private int st_lockers_nowait; 319 /** 320 The number of requests to allocate or deallocate a locker for which the 321 thread of control did not wait. 322 */ 323 public int getLockersNowait() { 324 return st_lockers_nowait; 325 } 326 327 private int st_region_wait; 328 /** 329 The number of times that a thread of control was forced to wait 330 before obtaining the region lock. 331 */ 332 public int getRegionWait() { 333 return st_region_wait; 334 } 335 336 private int st_region_nowait; 337 /** 338 The number of times that a thread of control was able to obtain the 339 region lock without waiting. 340 */ 341 public int getRegionNowait() { 342 return st_region_nowait; 343 } 344 345 private int st_hash_len; 346 /** 347 Maximum length of a lock hash bucket. 348 */ 349 public int getHashLen() { 350 return st_hash_len; 351 } 352 353 private int st_regsize; 354 /** 355 The size of the lock region. 356 */ 357 public int getRegSize() { 358 return st_regsize; 359 } 360 361 /** 362 For convenience, the LockStats class has a toString method 363 that lists all the data fields. 364 */ 365 public String toString() { 366 return "LockStats:" 367 + "\n st_id=" + st_id 368 + "\n st_cur_maxid=" + st_cur_maxid 369 + "\n st_maxlocks=" + st_maxlocks 370 + "\n st_maxlockers=" + st_maxlockers 371 + "\n st_maxobjects=" + st_maxobjects 372 + "\n st_partitions=" + st_partitions 373 + "\n st_nmodes=" + st_nmodes 374 + "\n st_nlockers=" + st_nlockers 375 + "\n st_nlocks=" + st_nlocks 376 + "\n st_maxnlocks=" + st_maxnlocks 377 + "\n st_maxhlocks=" + st_maxhlocks 378 + "\n st_locksteals=" + st_locksteals 379 + "\n st_maxlsteals=" + st_maxlsteals 380 + "\n st_maxnlockers=" + st_maxnlockers 381 + "\n st_nobjects=" + st_nobjects 382 + "\n st_maxnobjects=" + st_maxnobjects 383 + "\n st_maxhobjects=" + st_maxhobjects 384 + "\n st_objectsteals=" + st_objectsteals 385 + "\n st_maxosteals=" + st_maxosteals 386 + "\n st_nrequests=" + st_nrequests 387 + "\n st_nreleases=" + st_nreleases 388 + "\n st_nupgrade=" + st_nupgrade 389 + "\n st_ndowngrade=" + st_ndowngrade 390 + "\n st_lock_wait=" + st_lock_wait 391 + "\n st_lock_nowait=" + st_lock_nowait 392 + "\n st_ndeadlocks=" + st_ndeadlocks 393 + "\n st_locktimeout=" + st_locktimeout 394 + "\n st_nlocktimeouts=" + st_nlocktimeouts 395 + "\n st_txntimeout=" + st_txntimeout 396 + "\n st_ntxntimeouts=" + st_ntxntimeouts 397 + "\n st_part_wait=" + st_part_wait 398 + "\n st_part_nowait=" + st_part_nowait 399 + "\n st_part_max_wait=" + st_part_max_wait 400 + "\n st_part_max_nowait=" + st_part_max_nowait 401 + "\n st_objs_wait=" + st_objs_wait 402 + "\n st_objs_nowait=" + st_objs_nowait 403 + "\n st_lockers_wait=" + st_lockers_wait 404 + "\n st_lockers_nowait=" + st_lockers_nowait 405 + "\n st_region_wait=" + st_region_wait 406 + "\n st_region_nowait=" + st_region_nowait 407 + "\n st_hash_len=" + st_hash_len 408 + "\n st_regsize=" + st_regsize 409 ; 410 } 411} 412