@Override
    public void run() {
      try {
        buffer = pool.allocate(size, maxBlockTimeInMs);
        allocated.countDown();
        if (used.await(1000, TimeUnit.MILLISECONDS)) {
          pool.deallocate(buffer);
        } else {
          exception = new IllegalStateException("BufferConsumer takes too long time to release buffer.");
        }
      } catch (Exception e) {
        exception = e;
      }
    }
An entity that has its own thread to request and release {@link ByteBuffer} from a {@link SimpleByteBufferPool}.
{@link CountDownLatch} is employed to ensure that a requested buffer has been allocated and the same buffer has
been fully deallocated back to the buffer pool.
ambry-utils/src/test/java/com/github/ambry/utils/SimpleByteBufferPoolTest.java