net.openhft.chronicle.queue.impl.single.AsyncBufferCreator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chronicle-queue Show documentation
Show all versions of chronicle-queue Show documentation
Java library for persisted low latency messaging (Java 8+)
package net.openhft.chronicle.queue.impl.single;
import net.openhft.chronicle.bytes.BytesStore;
import net.openhft.chronicle.core.util.ThrowingBiFunction;
import org.jetbrains.annotations.NotNull;
import java.io.File;
/**
* Creates a buffer for use in async mode. This is an enterprise feature.
*/
public interface AsyncBufferCreator extends ThrowingBiFunction, Exception> {
@Override
default @NotNull BytesStore, ?> apply(Long size, Integer maxReaders) throws Exception {
throw new UnsupportedOperationException("Call the create function instead");
}
@NotNull BytesStore, ?> create(long size, int maxReaders, File file) throws Exception;
}