Examples of maxCapacity()


Examples of buildcraft.api.mj.IBatteryObject.maxCapacity()

      for (PartP2PBCPower g : getOutputs())
      {
        IBatteryObject o = g.getTargetBattery();
        if ( o != null )
          totalRequiredPower += o.maxCapacity();
      }

      return totalRequiredPower;
    }
    catch (GridAccessException e)
View Full Code Here

Examples of io.netty.buffer.ByteBuf.maxCapacity()

                if (byteBuf.isWritable()) {
                    continue;
                }

                final int capacity = byteBuf.capacity();
                final int maxCapacity = byteBuf.maxCapacity();
                if (capacity == maxCapacity) {
                    if (read) {
                        read = false;
                        pipeline.fireInboundBufferUpdated();
                        if (!byteBuf.isWritable()) {
View Full Code Here

Examples of io.netty.buffer.ByteBuf.maxCapacity()

                    break;
                }

                if (!byteBuf.isWritable()) {
                    final int capacity = byteBuf.capacity();
                    final int maxCapacity = byteBuf.maxCapacity();
                    if (capacity == maxCapacity) {
                        if (read) {
                            read = false;
                            pipeline.fireChannelRead(byteBuf);
                            byteBuf = alloc().buffer();
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

        MemoryBuffer bf1 = allocator.allocate( 180 );
        Assert.assertEquals( 180, bf1.maxCapacity() );
        Assert.assertEquals( 180, bf1.capacity() );

        MemoryBuffer bf2 = allocator.allocate( 10 );
        Assert.assertEquals( 20, bf2.maxCapacity() );
        Assert.assertEquals( 10, bf2.capacity() );

        allocator.close();
    }
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

       
       
        Allocator allocator = new SlabByteBufferAllocator( 0, slabs, false );
       
        MemoryBuffer bf1 = allocator.allocate( 250 );
        Assert.assertEquals( 256, bf1.maxCapacity() );
        Assert.assertEquals( 250, bf1.capacity() );
       
        MemoryBuffer bf2 = allocator.allocate( 251 );
        Assert.assertEquals( 256, bf2.maxCapacity() );
        Assert.assertEquals( 251, bf2.capacity() );
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

        MemoryBuffer bf1 = allocator.allocate( 250 );
        Assert.assertEquals( 256, bf1.maxCapacity() );
        Assert.assertEquals( 250, bf1.capacity() );
       
        MemoryBuffer bf2 = allocator.allocate( 251 );
        Assert.assertEquals( 256, bf2.maxCapacity() );
        Assert.assertEquals( 251, bf2.capacity() );
       
        MemoryBuffer bf3 = allocator.allocate( 200 );
        Assert.assertEquals( 256, bf3.maxCapacity() );
        Assert.assertEquals( 200, bf3.capacity() );
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

        MemoryBuffer bf2 = allocator.allocate( 251 );
        Assert.assertEquals( 256, bf2.maxCapacity() );
        Assert.assertEquals( 251, bf2.capacity() );
       
        MemoryBuffer bf3 = allocator.allocate( 200 );
        Assert.assertEquals( 256, bf3.maxCapacity() );
        Assert.assertEquals( 200, bf3.capacity() );
       
        MemoryBuffer bf4 = allocator.allocate( 100 );
        Assert.assertEquals( 128, bf4.maxCapacity() );
        Assert.assertEquals( 100, bf4.capacity() );
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

        MemoryBuffer bf3 = allocator.allocate( 200 );
        Assert.assertEquals( 256, bf3.maxCapacity() );
        Assert.assertEquals( 200, bf3.capacity() );
       
        MemoryBuffer bf4 = allocator.allocate( 100 );
        Assert.assertEquals( 128, bf4.maxCapacity() );
        Assert.assertEquals( 100, bf4.capacity() );
       
        MemoryBuffer bf5 = allocator.allocate( 550 );
        Assert.assertEquals( 1024, bf5.maxCapacity() );
        Assert.assertEquals( 550, bf5.capacity() );
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

        MemoryBuffer bf4 = allocator.allocate( 100 );
        Assert.assertEquals( 128, bf4.maxCapacity() );
        Assert.assertEquals( 100, bf4.capacity() );
       
        MemoryBuffer bf5 = allocator.allocate( 550 );
        Assert.assertEquals( 1024, bf5.maxCapacity() );
        Assert.assertEquals( 550, bf5.capacity() );
       
        MemoryBuffer bf6 = allocator.allocate( 800 );
        Assert.assertNull( bf6 );
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.maxCapacity()

        Assert.assertNull( bf6 );

        allocator.free( bf5 );
       
        MemoryBuffer bf7 = allocator.allocate( 800 );
        Assert.assertEquals( 1024, bf7.maxCapacity() );
        Assert.assertEquals( 800, bf7.capacity() );
    
        allocator.close();
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.