Class 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 Detail

      • ConnectionStore

        @Inject
        public ConnectionStore​(org.forgerock.openam.cts.monitoring.impl.connections.ConnectionMonitor successMonitor,
                               org.forgerock.openam.cts.monitoring.impl.connections.ConnectionMonitor failureMonitor)
    • 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