All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deephaven.io.log.LogBufferPoolLenientImpl Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.io.log;

import io.deephaven.base.pool.ThreadSafeLenientFixedSizePool;

import java.nio.ByteBuffer;

class LogBufferPoolLenientImpl extends ThreadSafeLenientFixedSizePool implements LogBufferPool {

    private final int bufferSize;

    public LogBufferPoolLenientImpl(int bufferCount, final int bufferSize) {
        super(bufferCount, () -> ByteBuffer.allocate(bufferSize), ByteBuffer::clear);
        this.bufferSize = bufferSize;

    }

    @Override
    public ByteBuffer take(int minSize) {
        if (minSize > bufferSize) {
            throw new UnsupportedOperationException("Not Implemented Yet");
        }
        return take();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy