Class NullBalancer

  • All Implemented Interfaces:
    Balancer

    final class NullBalancer
    extends java.lang.Object
    implements Balancer
    This balancer implements Balancer and does not do anything -no blocking operation.
    Since:
    2.16
    See Also:
    Balancer
    • Constructor Summary

      Constructors 
      Constructor Description
      NullBalancer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acquirePermit()
      Acquires a permit from this balancer, blocking until one is available.
      void releaseAllPermits()  
      void releasePermit()
      Releases a permit, returning it to the balancer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullBalancer

        NullBalancer()
    • Method Detail

      • acquirePermit

        public boolean acquirePermit()
        Description copied from interface: Balancer
        Acquires a permit from this balancer, blocking until one is available.
        Specified by:
        acquirePermit in interface Balancer
        Returns:
        true if current thread is NOT interrupted while waiting for a permit.
      • releasePermit

        public void releasePermit()
        Description copied from interface: Balancer
        Releases a permit, returning it to the balancer.
        Specified by:
        releasePermit in interface Balancer