KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > monitor > statistics > EJBCacheStats


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * $Id: EJBCacheStats.java,v 1.3 2005/12/25 03:51:13 tcfujii Exp $
26  * $Date: 2005/12/25 03:51:13 $
27  * $Revision: 1.3 $
28  */

29
30 package com.sun.appserv.management.monitor.statistics;
31 import javax.management.j2ee.statistics.Stats JavaDoc;
32 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
33 import javax.management.j2ee.statistics.BoundedRangeStatistic JavaDoc;
34
35 /**
36  * A Stats interface to represent the statistics exposed by the Enterprise Bean Cache.
37  * This is based on the statistics that were exposed in S1AS7.0. An implementation of EJB Cache
38  * should provide statistical data by implementing this interface.
39  */

40 public interface EJBCacheStats extends Stats JavaDoc
41 {
42     
43     /**
44      * Returns the number of times a user request fails to find an EJB in associated EJB cache instance, as a CountStatistic.
45      * @return an instance of {@link BoundedRangeStatistic}
46      */

47     public BoundedRangeStatistic JavaDoc getCacheMisses();
48     
49     /**
50      * Returns the number of times a user request hits an EJB in associated EJB cache instance, as a CountStatistic.
51      * @return an instance of {@link BoundedRangeStatistic}
52      */

53     public BoundedRangeStatistic JavaDoc getCacheHits();
54     
55     /** Returns total number of EJBs in the associated EJB Cache, as a BoundedRangeStatistic.
56      * Note that this returns the various statistical values like maximum and minimum value attained
57      * as a part of the return value.
58      * @return an instance of {@link BoundedRangeStatistic}
59      */

60     public BoundedRangeStatistic JavaDoc getBeansInCache();
61     
62     /**
63      * Returns the number of passivations of a Stateful Session Bean, as a CountStatistic.
64      * @return an instance of {@link CountStatistic}
65      */

66     public CountStatistic JavaDoc getPassivations();
67     
68     /**
69      * Returns the number of errors in passivating a Stateful Session Bean, as a CountStatistic.
70      * Must be less than or equal to {@link #getPassivations}
71      * @return an instance of {@link CountStatistic}
72      */

73     public CountStatistic JavaDoc getPassivationErrors();
74     
75     /**
76      * Returns the number of removed Expired Sessions as a CountStatistic.
77      * @return an instance of {@link CountStatistic}
78      */

79     public CountStatistic JavaDoc getExpiredSessionsRemoved();
80     
81     /**
82      * Returns the number of errors in passivating a Stateful Session Bean, as a CountStatistic.
83      * Must be less than or equal to {@link #getPassivations}
84      * @return an instance of {@link CountStatistic}
85      */

86     public CountStatistic JavaDoc getPassivationSuccesses();
87 }
88
Popular Tags