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
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionConnectionsEndpoint(ApplicationContext context, long defaultIdleTimeInMillis) -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseConnections(Duration idleTime, ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for allPooledConnection,CommunicatorandClientbeans.voidcloseConnectionsForBean(String beanName, Duration idleTime, ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for a specificPooledConnection,CommunicatorandClientbean.
-
Constructor Details
-
ConnectionsEndpoint
-
-
Method Details
-
listCloseableBeans
- Returns:
- All
PooledConnection,CommunicatorandClientbeans.
-
closeConnections
@DeleteOperation public void closeConnections(@Nullable Duration idleTime, @Nullable ConnectionsEndpoint.CloseableConnectionState state) Closes all connections that are idle, expired or both for allPooledConnection,CommunicatorandClientbeans.- Parameters:
idleTime- The idle time; ignored ifcloseisConnectionsEndpoint.CloseableConnectionState.EXPIRED.state-ConnectionsEndpoint.CloseableConnectionState.IDLEto close all idle connections,ConnectionsEndpoint.CloseableConnectionState.EXPIREDto close all expired connections, ornullto 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,CommunicatorandClientbean.- Parameters:
beanName- The name of thePooledConnection,CommunicatororClientbean.idleTime- The idle time; ignored ifcloseisConnectionsEndpoint.CloseableConnectionState.EXPIRED.state-ConnectionsEndpoint.CloseableConnectionState.IDLEto close all idle connections,ConnectionsEndpoint.CloseableConnectionState.EXPIREDto close all expired connections, ornullto close all idle and expired connections.- Since:
- 3.8
-