Package org.apache.directmemory.memory.allocator

Examples of org.apache.directmemory.memory.allocator.FixedSizeByteBufferAllocatorImpl


            @Override
            protected ByteBufferAllocator instanciateByteBufferAllocator( int allocatorNumber, int size )
            {
                Collection<FixedSizeByteBufferAllocatorImpl> slabs = new HashSet<FixedSizeByteBufferAllocatorImpl>();
               
                slabs.add( new FixedSizeByteBufferAllocatorImpl(0, size, SMALL_PAYLOAD_LENGTH / 2, 1) );
                slabs.add( new FixedSizeByteBufferAllocatorImpl(1, size, SMALL_PAYLOAD_LENGTH, 1) );
               
                final SlabByteBufferAllocatorImpl allocator = new SlabByteBufferAllocatorImpl( allocatorNumber, slabs, false );
               
                return allocator;
            }
View Full Code Here


            @Override
            protected Allocator instanciateByteBufferAllocator( int allocatorNumber, int size )
            {
                Collection<FixedSizeByteBufferAllocatorImpl> slabs = new HashSet<FixedSizeByteBufferAllocatorImpl>();

                slabs.add( new FixedSizeByteBufferAllocatorImpl( 0, size, SMALL_PAYLOAD_LENGTH / 2, 1 ) );
                slabs.add( new FixedSizeByteBufferAllocatorImpl( 1, size, SMALL_PAYLOAD_LENGTH, 1 ) );
                slabs.add( new FixedSizeByteBufferAllocatorImpl( 2, size, SMALL_PAYLOAD_LENGTH * 2, 1 ) );

                final SlabByteBufferAllocator allocator =
                    new SlabByteBufferAllocator( allocatorNumber, slabs, false );

                return allocator;
View Full Code Here

TOP

Related Classes of org.apache.directmemory.memory.allocator.FixedSizeByteBufferAllocatorImpl

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.