test_class.declarator: numBuffers = 1024
test_class.modifier: private final static
test_class.original_string: private final static int numBuffers = 1024;
test_class.type: int
test_class.var_name: numBuffers
test_class.declarator: memorySegmentSize = 128
test_class.modifier: private final static
test_class.original_string: private final static int memorySegmentSize = 128;
test_class.type: int
test_class.var_name: memorySegmentSize
test_class.declarator: networkBufferPool
test_class.modifier: private
test_class.original_string: private NetworkBufferPool networkBufferPool;
test_class.type: NetworkBufferPool
test_class.var_name: networkBufferPool
test_class.declarator: localBufferPool
test_class.modifier: private
test_class.original_string: private BufferPool localBufferPool;
test_class.type: BufferPool
test_class.var_name: localBufferPool
test_class.declarator: executor = Executors.newCachedThreadPool()
test_class.modifier: private final static
test_class.original_string: private final static ExecutorService executor = Executors.newCachedThreadPool();
test_class.type: ExecutorService
test_class.var_name: executor
test_class.file: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPoolTest.java
test_class.identifier: LocalBufferPoolTest
test_case.body: @Test(expected = IllegalArgumentException.class)
  	public void testSetLessThanRequiredNumBuffers() throws IOException {
  		localBufferPool.setNumBuffers(1);
  
  		localBufferPool.setNumBuffers(0);
  	}
test_case.class_method_signature: LocalBufferPoolTest.testSetLessThanRequiredNumBuffers()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testSetLessThanRequiredNumBuffers()
test_case.identifier: testSetLessThanRequiredNumBuffers
test_case.invocations: setNumBuffers setNumBuffers
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetLessThanRequiredNumBuffers()
focal_class.declarator: networkBufferPool
focal_class.modifier: private final
focal_class.original_string: private final NetworkBufferPool networkBufferPool;
focal_class.type: NetworkBufferPool
focal_class.var_name: networkBufferPool
focal_class.declarator: numberOfRequiredMemorySegments
focal_class.modifier: private final
focal_class.original_string: private final int numberOfRequiredMemorySegments;
focal_class.type: int
focal_class.var_name: numberOfRequiredMemorySegments
focal_class.declarator: availableMemorySegments = new ArrayDeque<MemorySegment>()
focal_class.modifier: private final
focal_class.original_string: private final Queue<MemorySegment> availableMemorySegments = new ArrayDeque<MemorySegment>();
focal_class.type: Queue<MemorySegment>
focal_class.var_name: availableMemorySegments
focal_class.declarator: registeredListeners = new ArrayDeque<EventListener<Buffer>>()
focal_class.modifier: private final
focal_class.original_string: private final Queue<EventListener<Buffer>> registeredListeners = new ArrayDeque<EventListener<Buffer>>();
focal_class.type: Queue<EventListener<Buffer>>
focal_class.var_name: registeredListeners
focal_class.declarator: currentPoolSize
focal_class.modifier: private
focal_class.original_string: private int currentPoolSize;
focal_class.type: int
focal_class.var_name: currentPoolSize
focal_class.declarator: numberOfRequestedMemorySegments
focal_class.modifier: private
focal_class.original_string: private int numberOfRequestedMemorySegments;
focal_class.type: int
focal_class.var_name: numberOfRequestedMemorySegments
focal_class.declarator: isDestroyed
focal_class.modifier: private
focal_class.original_string: private boolean isDestroyed;
focal_class.type: boolean
focal_class.var_name: isDestroyed
focal_class.declarator: owner
focal_class.modifier: private
focal_class.original_string: private BufferPoolOwner owner;
focal_class.type: BufferPoolOwner
focal_class.var_name: owner
focal_class.file: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java
focal_class.identifier: LocalBufferPool
focal_class.interfaces: implements BufferPool
focal_class.class_method_signature: LocalBufferPool.LocalBufferPool(NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments)
focal_class.full_signature:   LocalBufferPool(NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments)
focal_class.identifier: LocalBufferPool
focal_class.parameters: (NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments)
focal_class.signature:  LocalBufferPool(NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments)
focal_class.class_method_signature: LocalBufferPool.isDestroyed()
focal_class.full_signature: @Override public boolean isDestroyed()
focal_class.identifier: isDestroyed
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDestroyed()
focal_class.class_method_signature: LocalBufferPool.getMemorySegmentSize()
focal_class.full_signature: @Override public int getMemorySegmentSize()
focal_class.identifier: getMemorySegmentSize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMemorySegmentSize()
focal_class.class_method_signature: LocalBufferPool.getNumberOfRequiredMemorySegments()
focal_class.full_signature: @Override public int getNumberOfRequiredMemorySegments()
focal_class.identifier: getNumberOfRequiredMemorySegments
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfRequiredMemorySegments()
focal_class.class_method_signature: LocalBufferPool.getNumberOfAvailableMemorySegments()
focal_class.full_signature: @Override public int getNumberOfAvailableMemorySegments()
focal_class.identifier: getNumberOfAvailableMemorySegments
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfAvailableMemorySegments()
focal_class.class_method_signature: LocalBufferPool.getNumBuffers()
focal_class.full_signature: @Override public int getNumBuffers()
focal_class.identifier: getNumBuffers
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumBuffers()
focal_class.class_method_signature: LocalBufferPool.setBufferPoolOwner(BufferPoolOwner owner)
focal_class.full_signature: @Override public void setBufferPoolOwner(BufferPoolOwner owner)
focal_class.identifier: setBufferPoolOwner
focal_class.modifiers: @Override public
focal_class.parameters: (BufferPoolOwner owner)
focal_class.return: void
focal_class.signature: void setBufferPoolOwner(BufferPoolOwner owner)
focal_class.class_method_signature: LocalBufferPool.requestBuffer()
focal_class.full_signature: @Override public Buffer requestBuffer()
focal_class.identifier: requestBuffer
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Buffer
focal_class.signature: Buffer requestBuffer()
focal_class.class_method_signature: LocalBufferPool.requestBufferBlocking()
focal_class.full_signature: @Override public Buffer requestBufferBlocking()
focal_class.identifier: requestBufferBlocking
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Buffer
focal_class.signature: Buffer requestBufferBlocking()
focal_class.class_method_signature: LocalBufferPool.requestBuffer(boolean isBlocking)
focal_class.full_signature: private Buffer requestBuffer(boolean isBlocking)
focal_class.identifier: requestBuffer
focal_class.modifiers: private
focal_class.parameters: (boolean isBlocking)
focal_class.return: Buffer
focal_class.signature: Buffer requestBuffer(boolean isBlocking)
focal_class.class_method_signature: LocalBufferPool.recycle(MemorySegment segment)
focal_class.full_signature: @Override public void recycle(MemorySegment segment)
focal_class.identifier: recycle
focal_class.modifiers: @Override public
focal_class.parameters: (MemorySegment segment)
focal_class.return: void
focal_class.signature: void recycle(MemorySegment segment)
focal_class.class_method_signature: LocalBufferPool.lazyDestroy()
focal_class.full_signature: @Override public void lazyDestroy()
focal_class.identifier: lazyDestroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void lazyDestroy()
focal_class.class_method_signature: LocalBufferPool.addListener(EventListener<Buffer> listener)
focal_class.full_signature: @Override public boolean addListener(EventListener<Buffer> listener)
focal_class.identifier: addListener
focal_class.modifiers: @Override public
focal_class.parameters: (EventListener<Buffer> listener)
focal_class.return: boolean
focal_class.signature: boolean addListener(EventListener<Buffer> listener)
focal_class.class_method_signature: LocalBufferPool.setNumBuffers(int numBuffers)
focal_class.full_signature: @Override public void setNumBuffers(int numBuffers)
focal_class.identifier: setNumBuffers
focal_class.modifiers: @Override public
focal_class.parameters: (int numBuffers)
focal_class.return: void
focal_class.signature: void setNumBuffers(int numBuffers)
focal_class.class_method_signature: LocalBufferPool.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: LocalBufferPool.returnMemorySegment(MemorySegment segment)
focal_class.full_signature: private void returnMemorySegment(MemorySegment segment)
focal_class.identifier: returnMemorySegment
focal_class.modifiers: private
focal_class.parameters: (MemorySegment segment)
focal_class.return: void
focal_class.signature: void returnMemorySegment(MemorySegment segment)
focal_class.class_method_signature: LocalBufferPool.returnExcessMemorySegments()
focal_class.full_signature: private void returnExcessMemorySegments()
focal_class.identifier: returnExcessMemorySegments
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void returnExcessMemorySegments()
focal_method.body: @Override
  	public void setNumBuffers(int numBuffers) throws IOException {
  		synchronized (availableMemorySegments) {
  			checkArgument(numBuffers >= numberOfRequiredMemorySegments, "Buffer pool needs at least " + numberOfRequiredMemorySegments + " buffers, but tried to set to " + numBuffers + ".");
  
  			currentPoolSize = numBuffers;
  
  			returnExcessMemorySegments();
  
  			// If there is a registered owner and we have still requested more buffers than our
  			// size, trigger a recycle via the owner.
  			if (owner != null && numberOfRequestedMemorySegments > currentPoolSize) {
  				owner.releaseMemory(numberOfRequestedMemorySegments - numBuffers);
  			}
  		}
  	}
focal_method.class_method_signature: LocalBufferPool.setNumBuffers(int numBuffers)
focal_method.full_signature: @Override public void setNumBuffers(int numBuffers)
focal_method.identifier: setNumBuffers
focal_method.invocations: checkArgument returnExcessMemorySegments releaseMemory
focal_method.modifiers: @Override public
focal_method.parameters: (int numBuffers)
focal_method.return: void
focal_method.signature: void setNumBuffers(int numBuffers)