Class ConnectionStore
- java.lang.Object
-
- org.forgerock.openam.cts.monitoring.impl.connections.ConnectionStore
-
public class ConnectionStore extends Object
A data structure that stores the cumulative count and rate for CTS connections. Periods can be customized through setting of the appropriate ConnectionMonitor values.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description ConnectionStore(org.forgerock.openam.cts.monitoring.impl.connections.ConnectionMonitor successMonitor, org.forgerock.openam.cts.monitoring.impl.connections.ConnectionMonitor failureMonitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnection(boolean success)
Increments the counter for a connection.double
getAverageConnectionsPerPeriod(boolean success)
Returns the average connections made in the customisable period.double
getConnectionsCumulativeCount(boolean success)
Returns the total number of connections made in the customisable period.double
getMaximumOperationsPerPeriod(boolean success)
Returns the maximum connections made in the customisable period.double
getMinimumOperationsPerPeriod(boolean success)
Returns the minimum connections made in the customisable period.
-
-
-
Method Detail
-
addConnection
public void addConnection(boolean success)
Increments the counter for a connection. Boolean indicator controls whether we increment the successful or unsuccessful connection counter.- Parameters:
success
- true if the connection attempt was successful, false otherwise
-
getAverageConnectionsPerPeriod
public double getAverageConnectionsPerPeriod(boolean success)
Returns the average connections made in the customisable period. Boolean indicator controls whether we return the successful or unsuccessful connection average rate.- Parameters:
success
- true if the connection attempt was successful, false otherwise- Returns:
- the average connection rate made within the given period
-
getMinimumOperationsPerPeriod
public double getMinimumOperationsPerPeriod(boolean success)
Returns the minimum connections made in the customisable period. Boolean indicator controls whether we return the successful or unsuccessful connection average rate.- Parameters:
success
- true if the connection attempt was successful, false otherwise- Returns:
- the minimum connection rate made within the given period
-
getMaximumOperationsPerPeriod
public double getMaximumOperationsPerPeriod(boolean success)
Returns the maximum connections made in the customisable period. Boolean indicator controls whether we return the successful or unsuccessful connection average rate.- Parameters:
success
- true if the connection attempt was successful, false otherwise- Returns:
- the maximum connection rate made within the given period
-
getConnectionsCumulativeCount
public double getConnectionsCumulativeCount(boolean success)
Returns the total number of connections made in the customisable period. Boolean indicator controls whether we return the successful or unsuccessful connection average rate.- Parameters:
success
- true if the connection attempt was successful, false otherwise- Returns:
- the total number of connections made since server startup
-
-