Class ThrottleContextFactory


  • public class ThrottleContextFactory
    extends Object
    Factory for creating a ThrottleContext - holds all callers runtime data - the current state
    • Constructor Detail

      • ThrottleContextFactory

        public ThrottleContextFactory()
    • Method Detail

      • createThrottleContext

        public static ThrottleContext createThrottleContext​(int throttletype,
                                                            ThrottleConfiguration configuration)
                                                     throws ThrottleException
        To create a ThrottleContext for the given throttle type Needs to provide a throttle configuration
        Parameters:
        throttletype - - The type of the throttle
        configuration - - The throttle configuration
        Returns:
        ThrottleContext - The corresponding ThrottleContext for the given throttle type
        Throws:
        ThrottleException - - Throws for if the throttle type is unknown
      • getThrottleWindowReplicatorInstance

        public static ThrottleWindowReplicator getThrottleWindowReplicatorInstance()
        Ger throttle window replicator instance to make sure that there will be one throttle replicator in the implementation
        Returns:
        ThrottleWindowReplicator instance
      • getThrottleContextCleanupTaskInstance

        public static ThrottleContextCleanupTask getThrottleContextCleanupTaskInstance()
        Get throttle caller context cleanup task instance implementation
        Returns:
        ThrottleWindowReplicator instance