|
| 1 | +/** |
| 2 | + * Copyright (c) 2008 - 2012 10gen, Inc. <http://10gen.com> |
| 3 | + * <p/> |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * <p/> |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * <p/> |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.mongodb; |
| 18 | + |
| 19 | +/** |
| 20 | + * A standard MBean interface for a Mongo connection pool, for use on Java 5 virtual machines. |
| 21 | + * <p> |
| 22 | + * This interface is NOT part of the public API. Be prepared for non-binary compatible changes in minor releases. |
| 23 | + */ |
| 24 | +public interface Java5MongoConnectionPoolMBean { |
| 25 | + /** |
| 26 | + * Gets the name of the pool. |
| 27 | + * |
| 28 | + * @return the name of the pool |
| 29 | + */ |
| 30 | + String getName(); |
| 31 | + |
| 32 | + /** |
| 33 | + * Gets the host that this connection pool is connecting to. |
| 34 | + * |
| 35 | + * @return the host |
| 36 | + */ |
| 37 | + String getHost(); |
| 38 | + |
| 39 | + /** |
| 40 | + * Gets the port that this connection pool is connecting to. |
| 41 | + * |
| 42 | + * @return the port |
| 43 | + */ |
| 44 | + int getPort(); |
| 45 | + |
| 46 | + /** |
| 47 | + * Gets the total number of pool members, including idle and and in-use members. |
| 48 | + * |
| 49 | + * @return total number of members |
| 50 | + */ |
| 51 | + int getTotal(); |
| 52 | + |
| 53 | + /** |
| 54 | + * Gets the number of pool members that are currently in use. |
| 55 | + * |
| 56 | + * @return number of in-use members |
| 57 | + */ |
| 58 | + int getInUse(); |
| 59 | + |
| 60 | + /** |
| 61 | + * Gets the maximum allowed size of the pool, including idle and in-use members. |
| 62 | + * |
| 63 | + * @return the maximum size |
| 64 | + */ |
| 65 | + int getMaxSize(); |
| 66 | +} |
0 commit comments