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/** 13The QueueStats object is used to return Queue database statistics. 14*/ 15public class QueueStats extends DatabaseStats { 16 // no public constructor 17 /* package */ QueueStats() {} 18 19 private int qs_magic; 20 /** 21 The magic number that identifies the file as a Queue file. 22 */ 23 public int getMagic() { 24 return qs_magic; 25 } 26 27 private int qs_version; 28 /** 29 The version of the Queue database. 30 */ 31 public int getVersion() { 32 return qs_version; 33 } 34 35 private int qs_metaflags; 36 /** 37 The metadata flags. 38 */ 39 public int getMetaFlags() { 40 return qs_metaflags; 41 } 42 43 private int qs_nkeys; 44 /** 45 The number of records in the database. 46 <p> 47 If the {@link com.sleepycat.db.Database#getStats Database.getStats} call was configured by the 48 {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method, the count will be the last 49 saved value unless it has never been calculated, in which case it 50 will be 0. 51 */ 52 public int getNumKeys() { 53 return qs_nkeys; 54 } 55 56 private int qs_ndata; 57 /** 58 The number of records in the database. 59 <p> 60 If the {@link com.sleepycat.db.Database#getStats Database.getStats} call was configured by the 61 {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method, the count will be the last 62 saved value unless it has never been calculated, in which case it 63 will be 0. 64 */ 65 public int getNumData() { 66 return qs_ndata; 67 } 68 69 private int qs_pagesize; 70 /** 71 The underlying database page size, in bytes. 72 */ 73 public int getPageSize() { 74 return qs_pagesize; 75 } 76 77 private int qs_extentsize; 78 /** 79 The underlying database extent size, in pages. 80 */ 81 public int getExtentSize() { 82 return qs_extentsize; 83 } 84 85 private int qs_pages; 86 /** 87 The number of pages in the database. 88<p> 89The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call 90was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method. 91 */ 92 public int getPages() { 93 return qs_pages; 94 } 95 96 private int qs_re_len; 97 /** 98 The length of the records. 99 */ 100 public int getReLen() { 101 return qs_re_len; 102 } 103 104 private int qs_re_pad; 105 /** 106 The padding byte value for the records. 107 */ 108 public int getRePad() { 109 return qs_re_pad; 110 } 111 112 private int qs_pgfree; 113 /** 114 The number of bytes free in database pages. 115<p> 116The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call 117was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method. 118 */ 119 public int getPagesFree() { 120 return qs_pgfree; 121 } 122 123 private int qs_first_recno; 124 /** 125 The first undeleted record in the database. 126 */ 127 public int getFirstRecno() { 128 return qs_first_recno; 129 } 130 131 private int qs_cur_recno; 132 /** 133 The next available record number. 134 */ 135 public int getCurRecno() { 136 return qs_cur_recno; 137 } 138 139 /** 140 For convenience, the QueueStats class has a toString method 141 that lists all the data fields. 142 */ 143 public String toString() { 144 return "QueueStats:" 145 + "\n qs_magic=" + qs_magic 146 + "\n qs_version=" + qs_version 147 + "\n qs_metaflags=" + qs_metaflags 148 + "\n qs_nkeys=" + qs_nkeys 149 + "\n qs_ndata=" + qs_ndata 150 + "\n qs_pagesize=" + qs_pagesize 151 + "\n qs_extentsize=" + qs_extentsize 152 + "\n qs_pages=" + qs_pages 153 + "\n qs_re_len=" + qs_re_len 154 + "\n qs_re_pad=" + qs_re_pad 155 + "\n qs_pgfree=" + qs_pgfree 156 + "\n qs_first_recno=" + qs_first_recno 157 + "\n qs_cur_recno=" + qs_cur_recno 158 ; 159 } 160} 161