KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > interceptors > CacheMgmtInterceptorMBean


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.cache.interceptors;
23
24 import javax.management.NotificationBroadcaster JavaDoc;
25
26 /**
27  * Interface capturing basic cache management statistics
28  *
29  * @author Jerry Gauthier
30  * @version $Id: CacheMgmtInterceptorMBean.java,v 1.5 2007/01/05 14:27:15 msurtani Exp $
31  */

32 public interface CacheMgmtInterceptorMBean extends InterceptorMBean, NotificationBroadcaster JavaDoc
33 {
34    /**
35     * Returns the number of cache attribute hits
36     *
37     * @return the number of cache hits
38     */

39    long getHits();
40
41    /**
42     * Returns the number of cache attribute misses
43     *
44     * @return the number of cache misses
45     */

46    long getMisses();
47
48    /**
49     * Returns the number of cache attribute put operations
50     *
51     * @return the number of cache put operations
52     */

53    long getStores();
54
55    /**
56     * Returns the number of cache eviction operations
57     *
58     * @return the number of cache eviction operations
59     */

60    long getEvictions();
61
62    int getNumberOfAttributes();
63
64    int getNumberOfNodes();
65
66    /**
67     * Returns the hit/miss ratio for the cache
68     * This ratio is defined as hits/(hits + misses)
69     *
70     * @return the hit/miss ratio for the cache
71     */

72    double getHitMissRatio();
73
74    /**
75     * Returns the read/write ratio for the cache
76     * This ratio is defined as (hits + misses)/stores
77     *
78     * @return the read/writes ratio for the cache
79     */

80    double getReadWriteRatio();
81
82    /**
83     * Returns average milliseconds for an attribute read operation
84     * This includes both hits and misses.
85     *
86     * @return the average number of milliseconds for a read operation
87     */

88    long getAverageReadTime();
89
90    /**
91     * Returns average milliseconds for an attribute write operation
92     *
93     * @return the average number of milliseconds for a write operation
94     */

95    long getAverageWriteTime();
96
97    /**
98     * Returns seconds since cache started
99     *
100     * @return the number of seconds since the cache was started
101     */

102    long getElapsedTime();
103
104    /**
105     * Returns seconds since cache statistics reset
106     * If statistics haven't been reset, this will be the same as ElapsedTime
107     *
108     * @return the number of seconds since the cache statistics were last reset
109     */

110    long getTimeSinceReset();
111 }
112
Popular Tags