001/* 002 * (C) Copyright 2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * matic 018 */ 019package org.nuxeo.ecm.core.management.jtajca; 020 021import javax.management.MXBean; 022 023/** 024 * @author matic 025 */ 026@MXBean 027public interface ConnectionPoolMonitor extends Monitor { 028 029 String NAME = Defaults.instance.name(ConnectionPoolMonitor.class, "%s"); 030 031 /** 032 * Returns the pool name 033 * 034 * @since 8.4 035 */ 036 String getName(); 037 038 int getConnectionCount(); 039 040 int getIdleConnectionCount(); 041 042 int getBlockingTimeoutMilliseconds(); 043 044 int getIdleTimeoutMinutes(); 045 046 /** 047 * 048 * Returns the active timeout before the connection being killed. 049 * 050 * @since 8.4 051 */ 052 int getActiveTimeoutMinutes(); 053 054 /** 055 * Returns the current killed connection count 056 * @since 8.4 057 */ 058 long getKilledActiveConnectionCount(); 059 060 /** 061 * Kills active timed out connections in the pool. Returns the killed count. 062 * 063 * 064 * @since 8.4 065 */ 066 int killActiveTimedoutConnections(); 067 068 /** 069 * Destroys the current connection manager and replace it by a new one 070 * 071 * 072 * @since 8.4 073 */ 074 void reset(); 075 076 077 078 079}