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/** 13Statistics about mutexes in a Berkeley DB database environment, returned 14by {@link Environment#getMutexStats} 15**/ 16public class MutexStats { 17 // no public constructor 18 /* package */ MutexStats() {} 19 20 private int st_mutex_align; 21 /** The mutex alignment, in bytes. **/ 22 public int getMutexAlign() { 23 return st_mutex_align; 24 } 25 26 private int st_mutex_tas_spins; 27 /** The number of times test-and-set mutexes will spin without blocking. **/ 28 public int getMutexTasSpins() { 29 return st_mutex_tas_spins; 30 } 31 32 private int st_mutex_cnt; 33 /** The total number of mutexes configured. **/ 34 public int getMutexCount() { 35 return st_mutex_cnt; 36 } 37 38 private int st_mutex_free; 39 /** The number of mutexes currently available. **/ 40 public int getMutexFree() { 41 return st_mutex_free; 42 } 43 44 private int st_mutex_inuse; 45 /** The number of mutexes currently in use. **/ 46 public int getMutexInuse() { 47 return st_mutex_inuse; 48 } 49 50 private int st_mutex_inuse_max; 51 /** The maximum number of mutexes ever in use. **/ 52 public int getMutexInuseMax() { 53 return st_mutex_inuse_max; 54 } 55 56 private int st_region_wait; 57 /** 58 The number of times that a thread of control was forced to wait before 59 obtaining the mutex region mutex. 60 **/ 61 public int getRegionWait() { 62 return st_region_wait; 63 } 64 65 private int st_region_nowait; 66 /** 67 The number of times that a thread of control was able to obtain 68 the mutex region mutex without waiting. 69 **/ 70 public int getRegionNowait() { 71 return st_region_nowait; 72 } 73 74 private int st_regsize; 75 /** The size of the mutex region, in bytes. **/ 76 public int getRegSize() { 77 return st_regsize; 78 } 79 80 /** 81 For convenience, the MutexStats class has a toString method that lists 82 all the data fields. 83 */ 84 public String toString() { 85 return "MutexStats:" 86 + "\n st_mutex_align=" + st_mutex_align 87 + "\n st_mutex_tas_spins=" + st_mutex_tas_spins 88 + "\n st_mutex_cnt=" + st_mutex_cnt 89 + "\n st_mutex_free=" + st_mutex_free 90 + "\n st_mutex_inuse=" + st_mutex_inuse 91 + "\n st_mutex_inuse_max=" + st_mutex_inuse_max 92 + "\n st_region_wait=" + st_region_wait 93 + "\n st_region_nowait=" + st_region_nowait 94 + "\n st_regsize=" + st_regsize 95 ; 96 } 97} 98