Java源码示例:org.apache.flink.runtime.io.network.netty.NettyBufferPool
示例1
private void testSetAllocator(boolean isBuffer) {
NetworkBuffer buffer = newBuffer(1024, 1024, isBuffer);
NettyBufferPool allocator = new NettyBufferPool(1);
buffer.setAllocator(allocator);
assertSame(allocator, buffer.alloc());
}
示例2
private void testSetAllocator(boolean isBuffer) {
NetworkBuffer buffer = newBuffer(1024, 1024, isBuffer);
NettyBufferPool allocator = new NettyBufferPool(1);
buffer.setAllocator(allocator);
assertSame(allocator, buffer.alloc());
}
示例3
private void testSetAllocator(boolean isBuffer) {
NetworkBuffer buffer = newBuffer(1024, 1024, isBuffer);
NettyBufferPool allocator = new NettyBufferPool(1);
buffer.setAllocator(allocator);
assertSame(allocator, buffer.alloc());
}
示例4
private void testForwardsSetAllocator(ReadOnlySlicedNetworkBuffer slice) {
NettyBufferPool allocator = new NettyBufferPool(1);
slice.setAllocator(allocator);
assertSame(buffer.alloc(), slice.alloc());
assertSame(allocator, slice.alloc());
}
示例5
private void testForwardsSetAllocator(ReadOnlySlicedNetworkBuffer slice) {
NettyBufferPool allocator = new NettyBufferPool(1);
slice.setAllocator(allocator);
assertSame(buffer.alloc(), slice.alloc());
assertSame(allocator, slice.alloc());
}
示例6
private void testForwardsSetAllocator(ReadOnlySlicedNetworkBuffer slice) {
NettyBufferPool allocator = new NettyBufferPool(1);
slice.setAllocator(allocator);
assertSame(buffer.alloc(), slice.alloc());
assertSame(allocator, slice.alloc());
}