Class LinearDrainingAdaptiveAlgorithm

  • All Implemented Interfaces:
    DrainingAdaptiveAlgorithm

    public class LinearDrainingAdaptiveAlgorithm
    extends java.lang.Object
    implements DrainingAdaptiveAlgorithm
    Linear implementation of the DrainingAdaptiveAlgorithm. Uses two percentage values for calculate the linear equation spring.session.save.async.maxratio.adaptive.algorithm - tells what should be the value when queue size is 100% spring.session.save.async.threshold.adaptive.algorithm - defines the threshold when algorithm should be applied, the value for the threshold is equal to spring.session.save.async.max.items.
    • Constructor Detail

      • LinearDrainingAdaptiveAlgorithm

        public LinearDrainingAdaptiveAlgorithm()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • computeDrainSizeLineary

        protected int computeDrainSizeLineary​(long currentSize,
                                              long threshold)
      • shouldAdapt

        protected boolean shouldAdapt​(long currentSize,
                                      long threshold)
      • setTenant

        public void setTenant​(Tenant tenant)