3 * Copyright (C) 2009-2022 SonarSource SA
4 * mailto:info AT sonarsource DOT com
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 package org.sonar.server.platform.monitoring;
22 public interface DbConnectionSectionMBean {
25 * Is database schema up-to-date or should it be upgraded ?
27 String getMigrationStatus();
32 int getPoolActiveConnections();
35 * The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.
37 int getPoolMaxActiveConnections();
39 int getPoolIdleConnections();
42 * The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.
44 int getPoolMaxIdleConnections();
47 * The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none.
49 int getPoolMinIdleConnections();
52 * The initial number of connections that are created when the pool is started.
54 int getPoolInitialSize();
57 * The maximum number of milliseconds that the pool will wait
58 * (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely.
60 long getPoolMaxWaitMillis();
63 * Flag to remove abandoned connections if they exceed the {@link #getPoolRemoveAbandonedTimeoutSeconds()}.
65 boolean getPoolRemoveAbandoned();
68 * Timeout in seconds before an abandoned connection can be removed.
70 int getPoolRemoveAbandonedTimeoutSeconds();