Class ConnectionsEndpoint
java.lang.Object
com.github.robtimus.connect.sdk.java.springboot.actuator.ConnectionsEndpoint
@Endpoint(id="connectSdkConnections",
enableByDefault=false)
public class ConnectionsEndpoint
extends Object
An
Endpoint
for managing connections in connect-sdk-java.- Author:
- Rob Spoor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static class
static enum
-
Constructor Summary
ConstructorDescriptionConnectionsEndpoint
(ApplicationContext context, long defaultIdleTimeInMillis) -
Method Summary
Modifier and TypeMethodDescriptionvoid
closeConnections
(Duration idleTime, ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for allPooledConnection
,Communicator
andClient
beans.void
closeConnectionsForBean
(String beanName, Duration idleTime, ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for a specificPooledConnection
,Communicator
andClient
bean.
-
Constructor Details
-
ConnectionsEndpoint
-
-
Method Details
-
listCloseableBeans
- Returns:
- All
PooledConnection
,Communicator
andClient
beans.
-
closeConnections
@DeleteOperation public void closeConnections(@Nullable Duration idleTime, @Nullable ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for allPooledConnection
,Communicator
andClient
beans.- Parameters:
idleTime
- The idle time; ignored ifclose
isConnectionsEndpoint.CloseableConnectionState.EXPIRED
.state
-ConnectionsEndpoint.CloseableConnectionState.IDLE
to close all idle connections,ConnectionsEndpoint.CloseableConnectionState.EXPIRED
to close all expired connections, ornull
to close all idle and expired connections.- Since:
- 3.8
-
closeConnectionsForBean
@DeleteOperation public void closeConnectionsForBean(@Selector String beanName, @Nullable Duration idleTime, @Nullable ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for a specificPooledConnection
,Communicator
andClient
bean.- Parameters:
beanName
- The name of thePooledConnection
,Communicator
orClient
bean.idleTime
- The idle time; ignored ifclose
isConnectionsEndpoint.CloseableConnectionState.EXPIRED
.state
-ConnectionsEndpoint.CloseableConnectionState.IDLE
to close all idle connections,ConnectionsEndpoint.CloseableConnectionState.EXPIRED
to close all expired connections, ornull
to close all idle and expired connections.- Since:
- 3.8
-