Class AsyncSemaphore


  • final class AsyncSemaphore
    extends java.lang.Object
    Provides a semaphore primitive, without blocking waiting on permits.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object lock  
      private int permits  
      private java.util.Queue<io.netty.channel.ChannelPromise> queue  
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncSemaphore​(int permits)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.netty.channel.ChannelFuture acquire​(io.netty.channel.ChannelHandlerContext ctx)  
      void release()  
      • Methods inherited from class java.lang.Object

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

      • lock

        private final java.lang.Object lock
      • queue

        private final java.util.Queue<io.netty.channel.ChannelPromise> queue
      • permits

        private int permits
    • Constructor Detail

      • AsyncSemaphore

        public AsyncSemaphore​(int permits)
    • Method Detail

      • acquire

        public io.netty.channel.ChannelFuture acquire​(io.netty.channel.ChannelHandlerContext ctx)
      • release

        public void release()