This commit is contained in:
Andrea Cavalli 2021-09-17 16:56:28 +02:00
parent 8764920083
commit 6782abb66d
62 changed files with 173 additions and 166 deletions

View File

@ -95,7 +95,7 @@
<artifactId>common-utils</artifactId> <artifactId>common-utils</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.netty5</groupId> <groupId>io.net5</groupId>
<artifactId>netty-buffer</artifactId> <artifactId>netty-buffer</artifactId>
</dependency> </dependency>
<dependency> <dependency>
@ -251,7 +251,7 @@
<version>1.1.4</version> <version>1.1.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.netty5</groupId> <groupId>io.net5</groupId>
<artifactId>netty-buffer</artifactId> <artifactId>netty-buffer</artifactId>
<version>5.0.0.Final-SNAPSHOT</version> <version>5.0.0.Final-SNAPSHOT</version>
</dependency> </dependency>

View File

@ -1,4 +1,4 @@
package io.netty5.buffer.api.pool; package io.net5.buffer.api.pool;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
@ -19,7 +19,7 @@ public class MetricUtils {
MethodHandle handle = null; MethodHandle handle = null;
try { try {
// Find the class // Find the class
var pooledBufferClass = Class.forName("io.netty5.buffer.api.pool.PooledBufferAllocatorMetric"); var pooledBufferClass = Class.forName("io.net5.buffer.api.pool.PooledBufferAllocatorMetric");
// Find the handle of the method // Find the handle of the method
handle = lookup.findVirtual(pooledBufferClass, "arenaMetrics", MethodType.methodType(List.class)); handle = lookup.findVirtual(pooledBufferClass, "arenaMetrics", MethodType.methodType(List.class));
} catch (NoSuchMethodException | IllegalAccessException | ClassNotFoundException ignored) { } catch (NoSuchMethodException | IllegalAccessException | ClassNotFoundException ignored) {

View File

@ -1,4 +1,4 @@
package io.netty5.buffer.api.pool; package io.net5.buffer.api.pool;
import java.util.List; import java.util.List;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.client; package it.cavallium.dbengine.client;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.client; package it.cavallium.dbengine.client;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationException;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.client; package it.cavallium.dbengine.client;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationException;
import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength; import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database; package it.cavallium.dbengine.database;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.client.DatabaseOptions;
import it.cavallium.dbengine.client.IndicizerAnalyzers; import it.cavallium.dbengine.client.IndicizerAnalyzers;
import it.cavallium.dbengine.client.IndicizerSimilarities; import it.cavallium.dbengine.client.IndicizerSimilarities;

View File

@ -1,10 +1,10 @@
package it.cavallium.dbengine.database; package it.cavallium.dbengine.database;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Drop; import io.net5.buffer.api.Drop;
import io.netty5.buffer.api.Owned; import io.net5.buffer.api.Owned;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.internal.ResourceSupport; import io.net5.buffer.api.internal.ResourceSupport;
import java.util.StringJoiner; import java.util.StringJoiner;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database; package it.cavallium.dbengine.database;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.BadBlock;
import it.cavallium.dbengine.database.serialization.BiSerializationFunction; import it.cavallium.dbengine.database.serialization.BiSerializationFunction;
import it.cavallium.dbengine.database.serialization.SerializationFunction; import it.cavallium.dbengine.database.serialization.SerializationFunction;

View File

@ -1,10 +1,10 @@
package it.cavallium.dbengine.database; package it.cavallium.dbengine.database;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Drop; import io.net5.buffer.api.Drop;
import io.netty5.buffer.api.Owned; import io.net5.buffer.api.Owned;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.internal.ResourceSupport; import io.net5.buffer.api.internal.ResourceSupport;
import java.util.StringJoiner; import java.util.StringJoiner;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -2,7 +2,7 @@ package it.cavallium.dbengine.database;
import com.google.common.primitives.Ints; import com.google.common.primitives.Ints;
import com.google.common.primitives.Longs; import com.google.common.primitives.Longs;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.database.collections.DatabaseInt; import it.cavallium.dbengine.database.collections.DatabaseInt;
import it.cavallium.dbengine.database.collections.DatabaseLong; import it.cavallium.dbengine.database.collections.DatabaseLong;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;

View File

@ -1,12 +1,12 @@
package it.cavallium.dbengine.database; package it.cavallium.dbengine.database;
import static io.netty5.buffer.Unpooled.wrappedBuffer; import static io.net5.buffer.Unpooled.wrappedBuffer;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Drop; import io.net5.buffer.api.Drop;
import io.netty5.buffer.api.Owned; import io.net5.buffer.api.Owned;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.internal.ResourceSupport; import io.net5.buffer.api.internal.ResourceSupport;
import java.util.StringJoiner; import java.util.StringJoiner;
/** /**

View File

@ -2,12 +2,12 @@ package it.cavallium.dbengine.database;
import com.google.common.primitives.Ints; import com.google.common.primitives.Ints;
import com.google.common.primitives.Longs; import com.google.common.primitives.Longs;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.CompositeBuffer; import io.net5.buffer.api.CompositeBuffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.util.IllegalReferenceCountException; import io.net5.util.IllegalReferenceCountException;
import io.netty5.util.internal.PlatformDependent; import io.net5.util.internal.PlatformDependent;
import it.cavallium.dbengine.database.collections.DatabaseStage; import it.cavallium.dbengine.database.collections.DatabaseStage;
import it.cavallium.dbengine.database.disk.MemorySegmentUtils; import it.cavallium.dbengine.database.disk.MemorySegmentUtils;
import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationException;
@ -23,6 +23,7 @@ import java.util.Map.Entry;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.ToIntFunction; import java.util.function.ToIntFunction;
import org.apache.lucene.document.Document; import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field; import org.apache.lucene.document.Field;
@ -349,7 +350,7 @@ public class LLUtils {
@NotNull @NotNull
public static DirectBuffer convertToDirect(BufferAllocator allocator, Send<Buffer> content) { public static DirectBuffer convertToDirect(BufferAllocator allocator, Send<Buffer> content) {
try (var buf = content.receive()) { try (var buf = content.receive()) {
if (buf.nativeAddress() != 0) { if (buf.countComponents() != 0) {
var direct = obtainDirect(buf); var direct = obtainDirect(buf);
return new DirectBuffer(buf.send(), direct); return new DirectBuffer(buf.send(), direct);
} else { } else {
@ -374,8 +375,14 @@ public class LLUtils {
+ " Please set \"--enable-preview --add-modules jdk.incubator.foreign -Dforeign.restricted=permit\""); + " Please set \"--enable-preview --add-modules jdk.incubator.foreign -Dforeign.restricted=permit\"");
} }
assert buffer.isAccessible(); assert buffer.isAccessible();
long nativeAddress; AtomicLong nativeAddress = new AtomicLong(0);
if ((nativeAddress = buffer.nativeAddress()) == 0) { if (buffer.countComponents() == 1 && buffer.countReadableComponents() == 1) {
buffer.forEachReadable(0, (i, c) -> {
nativeAddress.setPlain(c.readableNativeAddress());
return false;
});
}
if (nativeAddress.getPlain() == 0) {
if (buffer.capacity() == 0) { if (buffer.capacity() == 0) {
return EMPTY_BYTE_BUFFER; return EMPTY_BYTE_BUFFER;
} }
@ -384,7 +391,7 @@ public class LLUtils {
} }
throw new IllegalStateException("Buffer is not direct"); throw new IllegalStateException("Buffer is not direct");
} }
return MemorySegmentUtils.directBuffer(nativeAddress, buffer.capacity()); return MemorySegmentUtils.directBuffer(nativeAddress.getPlain(), buffer.capacity());
} }
public static Buffer fromByteArray(BufferAllocator alloc, byte[] array) { public static Buffer fromByteArray(BufferAllocator alloc, byte[] array) {

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;
import it.cavallium.dbengine.database.serialization.Serializer.DeserializationResult; import it.cavallium.dbengine.database.serialization.Serializer.DeserializationResult;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.internal.ResourceSupport; import io.net5.buffer.api.internal.ResourceSupport;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.Delta;
import it.cavallium.dbengine.database.ExtraKeyOperationResult; import it.cavallium.dbengine.database.ExtraKeyOperationResult;

View File

@ -1,10 +1,10 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Resource; import io.net5.buffer.api.Resource;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.util.IllegalReferenceCountException; import io.net5.util.IllegalReferenceCountException;
import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.BadBlock;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.BadBlock;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.internal.ResourceSupport; import io.net5.buffer.api.internal.ResourceSupport;
import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.BadBlock;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.Delta;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.Delta;
import it.cavallium.dbengine.database.ExtraKeyOperationResult; import it.cavallium.dbengine.database.ExtraKeyOperationResult;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength; import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.CompositeSnapshot;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;
public class SubStageGetterSingleBytes extends SubStageGetterSingle<Send<Buffer>> { public class SubStageGetterSingleBytes extends SubStageGetterSingle<Send<Buffer>> {

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationException;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationException;
import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer;
import it.unimi.dsi.fastutil.objects.ObjectArraySet; import it.unimi.dsi.fastutil.objects.ObjectArraySet;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.client.IndicizerAnalyzers; import it.cavallium.dbengine.client.IndicizerAnalyzers;
import it.cavallium.dbengine.client.IndicizerSimilarities; import it.cavallium.dbengine.client.IndicizerSimilarities;
import it.cavallium.dbengine.client.LuceneOptions; import it.cavallium.dbengine.client.LuceneOptions;

View File

@ -1,16 +1,16 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import static io.netty5.buffer.Unpooled.wrappedBuffer; import static io.net5.buffer.Unpooled.wrappedBuffer;
import static it.cavallium.dbengine.database.LLUtils.MARKER_ROCKSDB; import static it.cavallium.dbengine.database.LLUtils.MARKER_ROCKSDB;
import static it.cavallium.dbengine.database.LLUtils.fromByteArray; import static it.cavallium.dbengine.database.LLUtils.fromByteArray;
import static java.util.Objects.requireNonNull; import static java.util.Objects.requireNonNull;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Resource; import io.net5.buffer.api.Resource;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.internal.ResourceSupport; import io.net5.buffer.api.internal.ResourceSupport;
import io.netty5.util.internal.PlatformDependent; import io.net5.util.internal.PlatformDependent;
import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.BadBlock;
import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.client.DatabaseOptions;
import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.Column;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLEntry;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ColumnFamilyHandle;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLEntry;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ColumnFamilyHandle;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ColumnFamilyHandle;
import org.rocksdb.ReadOptions; import org.rocksdb.ReadOptions;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import it.unimi.dsi.fastutil.objects.ObjectArrayList; import it.unimi.dsi.fastutil.objects.ObjectArrayList;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ColumnFamilyHandle;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ColumnFamilyHandle;
import org.rocksdb.ReadOptions; import org.rocksdb.ReadOptions;

View File

@ -2,8 +2,8 @@ package it.cavallium.dbengine.database.disk;
import static it.cavallium.dbengine.database.LLUtils.MARKER_ROCKSDB; import static it.cavallium.dbengine.database.LLUtils.MARKER_ROCKSDB;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.util.internal.PlatformDependent; import io.net5.util.internal.PlatformDependent;
import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.Column;
import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.client.DatabaseOptions;
import it.cavallium.dbengine.database.LLKeyValueDatabase; import it.cavallium.dbengine.database.LLKeyValueDatabase;

View File

@ -2,10 +2,10 @@ package it.cavallium.dbengine.database.disk;
import static it.cavallium.dbengine.database.disk.LLLocalDictionary.getRocksIterator; import static it.cavallium.dbengine.database.disk.LLLocalDictionary.getRocksIterator;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.util.IllegalReferenceCountException; import io.net5.util.IllegalReferenceCountException;
import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLRange;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.util.internal.PlatformDependent; import io.net5.util.internal.PlatformDependent;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup; import java.lang.invoke.MethodHandles.Lookup;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.disk; package it.cavallium.dbengine.database.disk;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import it.cavallium.dbengine.database.SafeCloseable; import it.cavallium.dbengine.database.SafeCloseable;
import org.rocksdb.AbstractSlice; import org.rocksdb.AbstractSlice;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.memory; package it.cavallium.dbengine.database.memory;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.client.DatabaseOptions;
import it.cavallium.dbengine.client.IndicizerAnalyzers; import it.cavallium.dbengine.client.IndicizerAnalyzers;
import it.cavallium.dbengine.client.IndicizerSimilarities; import it.cavallium.dbengine.client.IndicizerSimilarities;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.memory; package it.cavallium.dbengine.database.memory;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.BadBlock;
import it.cavallium.dbengine.database.ExtraKeyOperationResult; import it.cavallium.dbengine.database.ExtraKeyOperationResult;
import it.cavallium.dbengine.database.LLDelta; import it.cavallium.dbengine.database.LLDelta;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.memory; package it.cavallium.dbengine.database.memory;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.Column;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.LLKeyValueDatabase; import it.cavallium.dbengine.database.LLKeyValueDatabase;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.memory; package it.cavallium.dbengine.database.memory;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLDictionaryResultType; import it.cavallium.dbengine.database.LLDictionaryResultType;
import it.cavallium.dbengine.database.LLSingleton; import it.cavallium.dbengine.database.LLSingleton;
import it.cavallium.dbengine.database.LLSnapshot; import it.cavallium.dbengine.database.LLSnapshot;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.database.serialization; package it.cavallium.dbengine.database.serialization;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.SafeCloseable; import it.cavallium.dbengine.database.SafeCloseable;
import java.io.DataInput; import java.io.DataInput;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.database.serialization; package it.cavallium.dbengine.database.serialization;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import java.io.DataOutput; import java.io.DataOutput;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.serialization; package it.cavallium.dbengine.database.serialization;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import java.io.IOError; import java.io.IOError;
import java.io.IOException; import java.io.IOException;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.serialization; package it.cavallium.dbengine.database.serialization;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.database.serialization; package it.cavallium.dbengine.database.serialization;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine.netty; package it.cavallium.dbengine.netty;
import io.netty5.buffer.api.pool.BufferAllocatorMetric; import io.net5.buffer.api.pool.BufferAllocatorMetric;
public class JMXNettyMonitoring implements JMXNettyMonitoringMBean { public class JMXNettyMonitoring implements JMXNettyMonitoringMBean {

View File

@ -1,10 +1,10 @@
package it.cavallium.dbengine.netty; package it.cavallium.dbengine.netty;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.DefaultGlobalBufferAllocator; import io.net5.buffer.api.DefaultGlobalBufferAllocator;
import io.netty5.buffer.api.pool.MetricUtils; import io.net5.buffer.api.pool.MetricUtils;
import io.netty5.buffer.api.pool.PoolArenaMetric; import io.net5.buffer.api.pool.PoolArenaMetric;
import io.netty5.buffer.api.pool.PooledBufferAllocator; import io.net5.buffer.api.pool.PooledBufferAllocator;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;

View File

@ -1,7 +1,7 @@
package it.cavallium.dbengine.netty; package it.cavallium.dbengine.netty;
import io.netty5.buffer.api.pool.PoolArenaMetric; import io.net5.buffer.api.pool.PoolArenaMetric;
public class JMXPoolArenaNettyMonitoring implements JMXPoolArenaNettyMonitoringMBean { public class JMXPoolArenaNettyMonitoring implements JMXPoolArenaNettyMonitoringMBean {

View File

@ -1,8 +1,8 @@
package it.cavallium.dbengine.netty; package it.cavallium.dbengine.netty;
import io.netty5.buffer.api.pool.BufferAllocatorMetric; import io.net5.buffer.api.pool.BufferAllocatorMetric;
import io.netty5.buffer.api.pool.PooledBufferAllocator; import io.net5.buffer.api.pool.PooledBufferAllocator;
import io.netty5.buffer.api.pool.PooledBufferAllocatorMetricUtils; import io.net5.buffer.api.pool.PooledBufferAllocatorMetricUtils;
import java.lang.reflect.Field; import java.lang.reflect.Field;
public class JMXPooledNettyMonitoring extends JMXNettyMonitoring implements JMXNettyMonitoringMBean { public class JMXPooledNettyMonitoring extends JMXNettyMonitoring implements JMXNettyMonitoringMBean {

View File

@ -2,10 +2,10 @@ package org.rocksdb;
import static it.cavallium.dbengine.database.LLUtils.isDirect; import static it.cavallium.dbengine.database.LLUtils.isDirect;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.util.internal.PlatformDependent; import io.net5.util.internal.PlatformDependent;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -2,13 +2,13 @@ package it.cavallium.dbengine;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.MemoryManager; import io.net5.buffer.api.MemoryManager;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import io.netty5.buffer.api.pool.MetricUtils; import io.net5.buffer.api.pool.MetricUtils;
import io.netty5.buffer.api.pool.PoolArenaMetric; import io.net5.buffer.api.pool.PoolArenaMetric;
import io.netty5.buffer.api.pool.PooledBufferAllocator; import io.net5.buffer.api.pool.PooledBufferAllocator;
import io.netty5.util.internal.PlatformDependent; import io.net5.util.internal.PlatformDependent;
import it.cavallium.dbengine.database.LLDatabaseConnection; import it.cavallium.dbengine.database.LLDatabaseConnection;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;
import it.cavallium.dbengine.database.LLKeyValueDatabase; import it.cavallium.dbengine.database.LLKeyValueDatabase;

View File

@ -1,6 +1,6 @@
package it.cavallium.dbengine; package it.cavallium.dbengine;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.DbTestUtils.TempDb; import it.cavallium.dbengine.DbTestUtils.TempDb;
import it.cavallium.dbengine.DbTestUtils.TestAllocator; import it.cavallium.dbengine.DbTestUtils.TestAllocator;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;

View File

@ -4,7 +4,7 @@ import static it.cavallium.dbengine.DbTestUtils.destroyAllocator;
import static it.cavallium.dbengine.DbTestUtils.ensureNoLeaks; import static it.cavallium.dbengine.DbTestUtils.ensureNoLeaks;
import static it.cavallium.dbengine.DbTestUtils.newAllocator; import static it.cavallium.dbengine.DbTestUtils.newAllocator;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;

View File

@ -6,8 +6,8 @@ import static it.cavallium.dbengine.DbTestUtils.newAllocator;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertThrows;
import io.netty5.buffer.api.Buffer; import io.net5.buffer.api.Buffer;
import io.netty5.buffer.api.Send; import io.net5.buffer.api.Send;
import it.cavallium.dbengine.DbTestUtils.TempDb; import it.cavallium.dbengine.DbTestUtils.TempDb;
import it.cavallium.dbengine.DbTestUtils.TestAllocator; import it.cavallium.dbengine.DbTestUtils.TestAllocator;
import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionary;

View File

@ -1,14 +1,14 @@
package it.cavallium.dbengine.database.collections; package it.cavallium.dbengine.database.collections;
import io.netty5.buffer.Unpooled; import io.net5.buffer.Unpooled;
import io.netty5.buffer.api.BufferAllocator; import io.net5.buffer.api.BufferAllocator;
import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LLUtils;
import java.util.Arrays; import java.util.Arrays;
import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static io.netty5.buffer.Unpooled.*; import static io.net5.buffer.Unpooled.*;
public class TestRanges { public class TestRanges {