class LocalBufferPool implements BufferPool {

	@Override
	public void setNumBuffers(int numBuffers) {
		CompletableFuture<?> toNotify = null;
		synchronized (availableMemorySegments) {
			checkArgument(numBuffers >= numberOfRequiredMemorySegments,
					"Buffer pool needs at least %s buffers, but tried to set to %s",
					numberOfRequiredMemorySegments, numBuffers);

			currentPoolSize = Math.min(numBuffers, maxNumberOfMemorySegments);

			returnExcessMemorySegments();

			if (checkAvailability()) {
				toNotify = availabilityHelper.getUnavailableToResetAvailable();
			} else {
				availabilityHelper.resetUnavailable();
			}

			checkConsistentAvailability();
		}

		mayNotifyAvailable(toNotify);
	}

	  LocalBufferPool(NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments);
	  LocalBufferPool(NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments,
			int maxNumberOfMemorySegments);
	  LocalBufferPool(
			NetworkBufferPool networkBufferPool,
			int numberOfRequiredMemorySegments,
			int maxNumberOfMemorySegments,
			int numberOfSubpartitions,
			int maxBuffersPerChannel);

}