code: public static synchronized PooledByteBufAllocator getSharedPooledByteBufAllocator(
        boolean allowDirectBufs,
        boolean allowCache) {
      final int index = allowCache ? 0 : 1;
      if (_sharedPooledByteBufAllocator[index] == null) {
        _sharedPooledByteBufAllocator[index] =
          createPooledByteBufAllocator(
            allowDirectBufs,
            allowCache,
            defaultNumThreads(0));
      }
      return _sharedPooledByteBufAllocator[index];
    }
docs: Returns the lazily created shared pooled ByteBuf allocator for the specified allowCache
  parameter value.