CavalliumDBEngine/src/main/java/it/cavallium/dbengine/database/LLSingleton.java

24 lines
713 B
Java
Raw Normal View History

2020-12-07 22:15:18 +01:00
package it.cavallium.dbengine.database;
2021-11-12 02:05:44 +01:00
import io.net5.buffer.api.Buffer;
import io.net5.buffer.api.BufferAllocator;
import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.serialization.SerializationFunction;
import it.unimi.dsi.fastutil.bytes.ByteList;
import java.util.function.Function;
2020-12-07 22:15:18 +01:00
import org.jetbrains.annotations.Nullable;
2021-01-30 10:52:14 +01:00
import reactor.core.publisher.Mono;
2020-12-07 22:15:18 +01:00
public interface LLSingleton extends LLKeyValueDatabaseStructure {
2021-11-12 02:05:44 +01:00
BufferAllocator getAllocator();
2021-01-30 10:52:14 +01:00
Mono<byte[]> get(@Nullable LLSnapshot snapshot);
2020-12-07 22:15:18 +01:00
2021-01-30 10:52:14 +01:00
Mono<Void> set(byte[] value);
2021-11-12 02:05:44 +01:00
Mono<Send<Buffer>> update(SerializationFunction<@Nullable Send<Buffer>, @Nullable Buffer> updater,
UpdateReturnMode updateReturnMode);
2020-12-07 22:15:18 +01:00
}