Package io.netty.buffer

Examples of io.netty.buffer.AccountingByteBuf


  }

  public AccountingByteBuf buffer(int min, int max) {
    if(!acct.reserve(min)) return null;
    ByteBuf buffer = innerAllocator.directBuffer(min, max);
    AccountingByteBuf wrapped = new AccountingByteBuf(acct, buffer);
    acct.reserved(min, wrapped);
    return wrapped;
  }
View Full Code Here


        logger.warn("Unable to allocate buffer of size {} due to memory limit. Current allocation: {}", size, getAllocatedMemory());
        return null;
      };

      ByteBuf buffer = innerAllocator.directBuffer(size, max);
      AccountingByteBuf wrapped = new AccountingByteBuf(childAcct, buffer);
      childAcct.reserved(buffer.capacity(), wrapped);
      return wrapped;
    }
View Full Code Here

    }


    public AccountingByteBuf getAllocation(){
      AccountingByteBuf b = new AccountingByteBuf(acct, innerAllocator.buffer(bytes));
      acct.reserved(bytes, b);
      return b;
    }
View Full Code Here

TOP

Related Classes of io.netty.buffer.AccountingByteBuf

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.