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 * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. 26 * Use is subject to license terms. 27 */ 28 29 /* 30 * $Id: EJBCacheStats.java,v 1.2 2005/12/25 03:52:13 tcfujii Exp $ 31 * $Date: 2005/12/25 03:52:13 $ 32 * $Revision: 1.2 $ 33 */ 34 35 package com.sun.enterprise.admin.monitor.stats; 36 import javax.management.j2ee.statistics.Stats; 37 import javax.management.j2ee.statistics.CountStatistic; 38 import javax.management.j2ee.statistics.BoundedRangeStatistic; 39 40 /** 41 * A Stats interface to represent the statistics exposed by the Enterprise Bean Cache. 42 * This is based on the statistics that were exposed in S1AS7.0. An implementation of EJB Cache 43 * should provide statistical data by implementing this interface. 44 * @author Muralidhar Vempaty 45 * @author Kedar Mhaswade 46 * @since S1AS8.0 47 * @version 1.0 48 */ 49 public interface EJBCacheStats extends Stats { 50 51 /** 52 * Returns the number of times a user request fails to find an EJB in associated EJB cache instance, as a CountStatistic. 53 * @return an instance of {@link BoundedRangeStatistic} 54 */ 55 public BoundedRangeStatistic getCacheMisses(); 56 57 /** 58 * Returns the number of times a user request hits an EJB in associated EJB cache instance, as a CountStatistic. 59 * @return an instance of {@link BoundedRangeStatistic} 60 */ 61 public BoundedRangeStatistic getCacheHits(); 62 63 /** Returns total number of EJBs in the associated EJB Cache, as a BoundedRangeStatistic. 64 * Note that this returns the various statistical values like maximum and minimum value attained 65 * as a part of the return value. 66 * @return an instance of {@link BoundedRangeStatistic} 67 */ 68 public BoundedRangeStatistic getNumBeansInCache(); 69 70 /** 71 * Returns the number of passivations of a Stateful Session Bean, as a CountStatistic. 72 * @return an instance of {@link CountStatistic} 73 */ 74 public CountStatistic getNumPassivations(); 75 76 /** 77 * Returns the number of errors in passivating a Stateful Session Bean, as a CountStatistic. 78 * Must be less than or equal to {@link #getNumPassivations} 79 * @return an instance of {@link CountStatistic} 80 */ 81 public CountStatistic getNumPassivationErrors(); 82 83 /** 84 * Returns the number of removed Expired Sessions as a CountStatistic. 85 * @return an instance of {@link CountStatistic} 86 */ 87 public CountStatistic getNumExpiredSessionsRemoved(); 88 89 /** 90 * Returns the number of errors in passivating a Stateful Session Bean, as a CountStatistic. 91 * Must be less than or equal to {@link #getNumPassivations} 92 * @return an instance of {@link CountStatistic} 93 */ 94 public CountStatistic getNumPassivationSuccess(); 95 } 96