Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / lang / java / src / com / sleepycat / db / CacheFileStats.java
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, 2012 Oracle and/or its affiliates.  All rights reserved.
8  */
9
10 package com.sleepycat.db;
11
12 /**
13 Statistics for a file in the cache.
14 */
15 public class CacheFileStats {
16     // no public constructor
17     /* package */ CacheFileStats() {}
18
19     private int st_pagesize;
20     /**
21     Page size in bytes.
22     */
23     public int getPageSize() {
24         return st_pagesize;
25     }
26
27     private int st_map;
28     /**
29     Requested pages mapped into the process' address space.
30     */
31     public int getMap() {
32         return st_map;
33     }
34
35     private long st_cache_hit;
36     /**
37     Requested pages found in the cache.
38     */
39     public long getCacheHit() {
40         return st_cache_hit;
41     }
42
43     private long st_cache_miss;
44     /**
45     Requested pages not found in the cache.
46     */
47     public long getCacheMiss() {
48         return st_cache_miss;
49     }
50
51     private long st_page_create;
52     /**
53     Pages created in the cache.
54     */
55     public long getPageCreate() {
56         return st_page_create;
57     }
58
59     private long st_page_in;
60     /**
61     Pages read into the cache.
62     */
63     public long getPageIn() {
64         return st_page_in;
65     }
66
67     private long st_page_out;
68     /**
69     Pages written from the cache to the backing file.
70     */
71     public long getPageOut() {
72         return st_page_out;
73     }
74
75     private long st_backup_spins;
76     /** TODO */
77     public long getBackupSpins() {
78         return st_backup_spins;
79     }
80
81     private String file_name;
82     /**
83     The name of the file.
84     */
85     public String getFileName() {
86         return file_name;
87     }
88
89     /**
90     For convenience, the CacheFileStats class has a toString method
91     that lists all the data fields.
92     */
93     public String toString() {
94         return "CacheFileStats:"
95             + "\n  st_pagesize=" + st_pagesize
96             + "\n  st_map=" + st_map
97             + "\n  st_cache_hit=" + st_cache_hit
98             + "\n  st_cache_miss=" + st_cache_miss
99             + "\n  st_page_create=" + st_page_create
100             + "\n  st_page_in=" + st_page_in
101             + "\n  st_page_out=" + st_page_out
102             + "\n  st_backup_spins=" + st_backup_spins
103             + "\n  file_name=" + file_name
104             ;
105     }
106 }