diff --git a/pom.xml b/pom.xml index c740646..756ae3b 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ common-utils - io.netty + io.netty5 netty-buffer @@ -250,7 +250,7 @@ 1.1.4 - io.netty + io.netty5 netty-buffer 5.0.0.Final-SNAPSHOT diff --git a/src/main/java/it/cavallium/dbengine/client/CompositeDatabase.java b/src/main/java/it/cavallium/dbengine/client/CompositeDatabase.java index cc8c66b..8fc7c06 100644 --- a/src/main/java/it/cavallium/dbengine/client/CompositeDatabase.java +++ b/src/main/java/it/cavallium/dbengine/client/CompositeDatabase.java @@ -1,6 +1,6 @@ package it.cavallium.dbengine.client; -import io.netty.buffer.api.BufferAllocator; +import io.netty5.buffer.api.BufferAllocator; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/src/main/java/it/cavallium/dbengine/client/MappedSerializer.java b/src/main/java/it/cavallium/dbengine/client/MappedSerializer.java index 790ba2e..c7afaf5 100644 --- a/src/main/java/it/cavallium/dbengine/client/MappedSerializer.java +++ b/src/main/java/it/cavallium/dbengine/client/MappedSerializer.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.client; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.Serializer; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/client/MappedSerializerFixedLength.java b/src/main/java/it/cavallium/dbengine/client/MappedSerializerFixedLength.java index fc201a1..a5f4847 100644 --- a/src/main/java/it/cavallium/dbengine/client/MappedSerializerFixedLength.java +++ b/src/main/java/it/cavallium/dbengine/client/MappedSerializerFixedLength.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.client; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/database/LLDatabaseConnection.java b/src/main/java/it/cavallium/dbengine/database/LLDatabaseConnection.java index defeefa..f84043b 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLDatabaseConnection.java +++ b/src/main/java/it/cavallium/dbengine/database/LLDatabaseConnection.java @@ -1,6 +1,6 @@ package it.cavallium.dbengine.database; -import io.netty.buffer.api.BufferAllocator; +import io.netty5.buffer.api.BufferAllocator; import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.client.IndicizerAnalyzers; import it.cavallium.dbengine.client.IndicizerSimilarities; diff --git a/src/main/java/it/cavallium/dbengine/database/LLDelta.java b/src/main/java/it/cavallium/dbengine/database/LLDelta.java index f16976e..62facce 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLDelta.java +++ b/src/main/java/it/cavallium/dbengine/database/LLDelta.java @@ -1,10 +1,10 @@ package it.cavallium.dbengine.database; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Drop; -import io.netty.buffer.api.Owned; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.internal.ResourceSupport; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Drop; +import io.netty5.buffer.api.Owned; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.internal.ResourceSupport; import java.util.StringJoiner; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/it/cavallium/dbengine/database/LLDictionary.java b/src/main/java/it/cavallium/dbengine/database/LLDictionary.java index 4f18cdc..28c36a4 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/LLDictionary.java @@ -1,15 +1,13 @@ package it.cavallium.dbengine.database; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.database.serialization.BiSerializationFunction; import it.cavallium.dbengine.database.serialization.SerializationFunction; import java.util.List; -import java.util.Map.Entry; import java.util.Optional; -import java.util.function.BiFunction; import java.util.function.Function; import org.jetbrains.annotations.Nullable; import org.warp.commonutils.concurrency.atomicity.NotAtomic; diff --git a/src/main/java/it/cavallium/dbengine/database/LLEntry.java b/src/main/java/it/cavallium/dbengine/database/LLEntry.java index f7c39fe..aae3135 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLEntry.java +++ b/src/main/java/it/cavallium/dbengine/database/LLEntry.java @@ -1,10 +1,10 @@ package it.cavallium.dbengine.database; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Drop; -import io.netty.buffer.api.Owned; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.internal.ResourceSupport; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Drop; +import io.netty5.buffer.api.Owned; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.internal.ResourceSupport; import java.util.StringJoiner; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/database/LLKeyValueDatabase.java b/src/main/java/it/cavallium/dbengine/database/LLKeyValueDatabase.java index 61023e3..b210913 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLKeyValueDatabase.java +++ b/src/main/java/it/cavallium/dbengine/database/LLKeyValueDatabase.java @@ -2,11 +2,10 @@ package it.cavallium.dbengine.database; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; -import io.netty.buffer.api.BufferAllocator; +import io.netty5.buffer.api.BufferAllocator; import it.cavallium.dbengine.database.collections.DatabaseInt; import it.cavallium.dbengine.database.collections.DatabaseLong; import java.nio.charset.StandardCharsets; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public interface LLKeyValueDatabase extends LLSnapshottable, LLKeyValueDatabaseStructure { diff --git a/src/main/java/it/cavallium/dbengine/database/LLRange.java b/src/main/java/it/cavallium/dbengine/database/LLRange.java index 3bb8fd1..39aafd6 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLRange.java +++ b/src/main/java/it/cavallium/dbengine/database/LLRange.java @@ -1,12 +1,12 @@ package it.cavallium.dbengine.database; -import static io.netty.buffer.Unpooled.wrappedBuffer; +import static io.netty5.buffer.Unpooled.wrappedBuffer; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Drop; -import io.netty.buffer.api.Owned; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.internal.ResourceSupport; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Drop; +import io.netty5.buffer.api.Owned; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.internal.ResourceSupport; import java.util.StringJoiner; /** diff --git a/src/main/java/it/cavallium/dbengine/database/LLUtils.java b/src/main/java/it/cavallium/dbengine/database/LLUtils.java index e96152c..c759ec6 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLUtils.java +++ b/src/main/java/it/cavallium/dbengine/database/LLUtils.java @@ -2,12 +2,12 @@ package it.cavallium.dbengine.database; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.CompositeBuffer; -import io.netty.buffer.api.Send; -import io.netty.util.IllegalReferenceCountException; -import io.netty.util.internal.PlatformDependent; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.CompositeBuffer; +import io.netty5.buffer.api.Send; +import io.netty5.util.IllegalReferenceCountException; +import io.netty5.util.internal.PlatformDependent; import it.cavallium.dbengine.database.disk.MemorySegmentUtils; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationFunction; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseEmpty.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseEmpty.java index c1b9e66..5664c54 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseEmpty.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseEmpty.java @@ -1,12 +1,11 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.Serializer.DeserializationResult; -import java.util.function.Function; import org.jetbrains.annotations.NotNull; public class DatabaseEmpty { diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java index 9c24eb2..4f048d3 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java @@ -1,11 +1,9 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.internal.ResourceSupport; -import io.netty.util.ReferenceCounted; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.internal.ResourceSupport; import it.cavallium.dbengine.client.CompositeSnapshot; -import it.cavallium.dbengine.client.NoMapper; import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.ExtraKeyOperationResult; import it.cavallium.dbengine.database.LLDictionary; @@ -19,21 +17,17 @@ import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationFunction; import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength; -import java.nio.ByteBuffer; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.Optional; -import java.util.function.BiFunction; -import java.util.function.Function; import org.jetbrains.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.publisher.SynchronousSink; import reactor.util.function.Tuple2; -import reactor.util.function.Tuple3; import reactor.util.function.Tuples; /** diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java index 65b5dbf..f32f316 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java @@ -1,10 +1,10 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Resource; -import io.netty.buffer.api.Send; -import io.netty.util.IllegalReferenceCountException; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Resource; +import io.netty5.buffer.api.Send; +import io.netty5.util.IllegalReferenceCountException; import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; @@ -20,8 +20,6 @@ import java.util.Map.Entry; import org.jetbrains.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import reactor.util.function.Tuple2; -import reactor.util.function.Tuples; // todo: implement optimized methods (which?) public class DatabaseMapDictionaryDeep> implements DatabaseStageMap { diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java index 8c98a79..9459140 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java @@ -1,35 +1,26 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; -import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.UpdateMode; -import it.cavallium.dbengine.database.collections.ValueGetter; import it.cavallium.dbengine.database.serialization.Serializer; import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength; import it.unimi.dsi.fastutil.objects.ObjectArraySet; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -import it.unimi.dsi.fastutil.objects.ObjectSets; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import reactor.util.function.Tuple2; -import reactor.util.function.Tuple3; -import reactor.util.function.Tuples; @SuppressWarnings("unused") public class DatabaseMapDictionaryHashed implements DatabaseStageMap> { diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionary.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionary.java index 08f3df0..3431556 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionary.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionaryHashed.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionaryHashed.java index 791d552..ee3677e 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionaryHashed.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSetDictionaryHashed.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java index fdd1be3..05cf858 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java @@ -1,9 +1,8 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.internal.ResourceSupport; -import io.netty.util.ReferenceCounted; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.internal.ResourceSupport; import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.Delta; @@ -16,7 +15,6 @@ import it.cavallium.dbengine.database.UpdateReturnMode; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationFunction; import it.cavallium.dbengine.database.serialization.Serializer; -import java.util.function.Function; import org.jetbrains.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetter.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetter.java index 173ce0e..d4b502b 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetter.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetter.java @@ -1,13 +1,10 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; -import java.util.Collection; -import java.util.List; import org.jetbrains.annotations.Nullable; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public interface SubStageGetter> { diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashMap.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashMap.java index 731f8c5..e80077d 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashMap.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashMap.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.serialization.Serializer; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashSet.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashSet.java index 15b2078..cdd35dc 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashSet.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterHashSet.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMap.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMap.java index 25879a5..ed1b779 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMap.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMap.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.serialization.Serializer; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMapDeep.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMapDeep.java index a5b21ba..8db2a52 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMapDeep.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterMapDeep.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.serialization.SerializerFixedBinaryLength; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSet.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSet.java index a3bcf22..8c969e3 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSet.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSet.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.collections.DatabaseEmpty.Nothing; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingle.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingle.java index 4fc3069..68f7e9c 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingle.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingle.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.serialization.Serializer; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingleBytes.java b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingleBytes.java index 0f38dbc..f6b94a6 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingleBytes.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/SubStageGetterSingleBytes.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.serialization.Serializer; public class SubStageGetterSingleBytes extends SubStageGetterSingle> { diff --git a/src/main/java/it/cavallium/dbengine/database/collections/ValueWithHashSerializer.java b/src/main/java/it/cavallium/dbengine/database/collections/ValueWithHashSerializer.java index 0d13357..44bcbb1 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/ValueWithHashSerializer.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/ValueWithHashSerializer.java @@ -1,8 +1,8 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.Serializer; diff --git a/src/main/java/it/cavallium/dbengine/database/collections/ValuesSetSerializer.java b/src/main/java/it/cavallium/dbengine/database/collections/ValuesSetSerializer.java index 7fb26c3..b463d6d 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/ValuesSetSerializer.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/ValuesSetSerializer.java @@ -1,17 +1,12 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.Serializer; import it.unimi.dsi.fastutil.objects.ObjectArraySet; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -import it.unimi.dsi.fastutil.objects.ObjectSets; import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; import org.jetbrains.annotations.NotNull; class ValuesSetSerializer implements Serializer> { diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDatabaseConnection.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDatabaseConnection.java index 9d6ecf4..0a155e8 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDatabaseConnection.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDatabaseConnection.java @@ -1,6 +1,6 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.BufferAllocator; +import io.netty5.buffer.api.BufferAllocator; import it.cavallium.dbengine.client.IndicizerAnalyzers; import it.cavallium.dbengine.client.IndicizerSimilarities; import it.cavallium.dbengine.client.LuceneOptions; @@ -11,7 +11,6 @@ import it.cavallium.dbengine.database.LLLuceneIndex; import it.cavallium.dbengine.netty.JMXNettyMonitoringManager; import java.nio.file.Files; import java.nio.file.Path; -import java.time.Duration; import java.util.LinkedList; import java.util.List; import reactor.core.publisher.Mono; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java index 94413c4..436c1e4 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java @@ -1,20 +1,18 @@ package it.cavallium.dbengine.database.disk; -import static io.netty.buffer.Unpooled.wrappedBuffer; +import static io.netty5.buffer.Unpooled.wrappedBuffer; import static it.cavallium.dbengine.database.LLUtils.fromByteArray; import static java.util.Objects.requireNonNull; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Resource; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.internal.ResourceSupport; -import io.netty.util.ReferenceCounted; -import io.netty.util.internal.PlatformDependent; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Resource; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.internal.ResourceSupport; +import io.netty5.util.internal.PlatformDependent; import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.database.Column; -import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.ExtraKeyOperationResult; import it.cavallium.dbengine.database.LLDelta; import it.cavallium.dbengine.database.LLDictionary; @@ -23,7 +21,6 @@ import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLSnapshot; import it.cavallium.dbengine.database.LLUtils; -import it.cavallium.dbengine.database.LLUtils.DirectBuffer; import it.cavallium.dbengine.database.RepeatedElementList; import it.cavallium.dbengine.database.SafeCloseable; import it.cavallium.dbengine.database.UpdateMode; @@ -31,23 +28,18 @@ import it.cavallium.dbengine.database.UpdateReturnMode; import it.cavallium.dbengine.database.serialization.BiSerializationFunction; import it.cavallium.dbengine.database.serialization.SerializationFunction; import it.unimi.dsi.fastutil.ints.IntArrayList; -import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; import java.time.Duration; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.List; -import java.util.Map; -import java.util.Map.Entry; import java.util.Objects; import java.util.Optional; import java.util.concurrent.Callable; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; import java.util.concurrent.locks.StampedLock; -import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.IntStream; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalEntryReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalEntryReactiveRocksIterator.java index ee7416a..91f6cbe 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalEntryReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalEntryReactiveRocksIterator.java @@ -1,12 +1,10 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLRange; -import java.util.Map; -import java.util.Map.Entry; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; import org.rocksdb.RocksDB; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedEntryReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedEntryReactiveRocksIterator.java index 1b597f5..10b797e 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedEntryReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedEntryReactiveRocksIterator.java @@ -1,12 +1,10 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLRange; -import java.util.Map; -import java.util.Map.Entry; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; import org.rocksdb.RocksDB; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedKeyReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedKeyReactiveRocksIterator.java index d04d9e0..e84d758 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedKeyReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedKeyReactiveRocksIterator.java @@ -1,8 +1,8 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLRange; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedReactiveRocksIterator.java index 1e297c3..2802727 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalGroupedReactiveRocksIterator.java @@ -1,21 +1,17 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLUtils; -import it.cavallium.dbengine.database.collections.DatabaseMapDictionaryDeep; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; import org.rocksdb.RocksDB; import org.rocksdb.RocksDBException; -import org.rocksdb.RocksMutableObject; import reactor.core.publisher.Flux; -import static io.netty.buffer.Unpooled.*; public abstract class LLLocalGroupedReactiveRocksIterator { diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyPrefixReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyPrefixReactiveRocksIterator.java index 263d05e..b0d860f 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyPrefixReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyPrefixReactiveRocksIterator.java @@ -1,18 +1,15 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLUtils; -import java.util.Arrays; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; import org.rocksdb.RocksDB; import org.rocksdb.RocksDBException; -import org.rocksdb.RocksMutableObject; import reactor.core.publisher.Flux; -import static io.netty.buffer.Unpooled.*; public class LLLocalKeyPrefixReactiveRocksIterator { diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyReactiveRocksIterator.java index 96b2c15..16f668f 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyReactiveRocksIterator.java @@ -1,8 +1,8 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLRange; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java index 1d5ffaf..8da4535 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java @@ -1,7 +1,7 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.BufferAllocator; -import io.netty.util.internal.PlatformDependent; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.util.internal.PlatformDependent; import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.database.LLKeyValueDatabase; @@ -41,8 +41,6 @@ import org.rocksdb.DBOptions; import org.rocksdb.DbPath; import org.rocksdb.FlushOptions; import org.rocksdb.IndexType; -import org.rocksdb.LRUCache; -import org.rocksdb.MemoryUtil; import org.rocksdb.Options; import org.rocksdb.RateLimiter; import org.rocksdb.RocksDB; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalReactiveRocksIterator.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalReactiveRocksIterator.java index 64771f5..0020132 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalReactiveRocksIterator.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalReactiveRocksIterator.java @@ -2,27 +2,18 @@ package it.cavallium.dbengine.database.disk; import static it.cavallium.dbengine.database.disk.LLLocalDictionary.getRocksIterator; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; -import io.netty.util.IllegalReferenceCountException; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; +import io.netty5.util.IllegalReferenceCountException; import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLUtils; -import it.cavallium.dbengine.database.collections.DatabaseMapDictionaryDeep; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import org.jetbrains.annotations.NotNull; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.ReadOptions; import org.rocksdb.RocksDB; import org.rocksdb.RocksDBException; -import org.rocksdb.RocksIterator; -import org.rocksdb.RocksMutableObject; import reactor.core.publisher.Flux; -import reactor.util.function.Tuple3; - -import static io.netty.buffer.Unpooled.*; -import static it.cavallium.dbengine.database.disk.LLLocalDictionary.logger; public abstract class LLLocalReactiveRocksIterator { diff --git a/src/main/java/it/cavallium/dbengine/database/disk/MemorySegmentUtils.java b/src/main/java/it/cavallium/dbengine/database/disk/MemorySegmentUtils.java index 83b045d..ee2f0cc 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/MemorySegmentUtils.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/MemorySegmentUtils.java @@ -1,6 +1,6 @@ package it.cavallium.dbengine.database.disk; -import io.netty.util.internal.PlatformDependent; +import io.netty5.util.internal.PlatformDependent; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles.Lookup; diff --git a/src/main/java/it/cavallium/dbengine/database/disk/ReleasableSlice.java b/src/main/java/it/cavallium/dbengine/database/disk/ReleasableSlice.java index f4fad27..26ebdb7 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/ReleasableSlice.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/ReleasableSlice.java @@ -1,7 +1,6 @@ package it.cavallium.dbengine.database.disk; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Resource; +import io.netty5.buffer.api.Buffer; import it.cavallium.dbengine.database.SafeCloseable; import org.rocksdb.AbstractSlice; diff --git a/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDatabaseConnection.java b/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDatabaseConnection.java index fcdd426..650c000 100644 --- a/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDatabaseConnection.java +++ b/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDatabaseConnection.java @@ -1,6 +1,6 @@ package it.cavallium.dbengine.database.memory; -import io.netty.buffer.api.BufferAllocator; +import io.netty5.buffer.api.BufferAllocator; import it.cavallium.dbengine.client.DatabaseOptions; import it.cavallium.dbengine.client.IndicizerAnalyzers; import it.cavallium.dbengine.client.IndicizerSimilarities; @@ -9,13 +9,8 @@ import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.LLDatabaseConnection; import it.cavallium.dbengine.database.LLKeyValueDatabase; import it.cavallium.dbengine.database.LLLuceneIndex; -import it.cavallium.dbengine.database.disk.LLLocalKeyValueDatabase; import it.cavallium.dbengine.database.disk.LLLocalLuceneIndex; -import it.cavallium.dbengine.database.disk.LLLocalMultiLuceneIndex; import it.cavallium.dbengine.netty.JMXNettyMonitoringManager; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.LinkedList; import java.util.List; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; diff --git a/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDictionary.java b/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDictionary.java index 50eff2f..845cbb7 100644 --- a/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryDictionary.java @@ -1,10 +1,9 @@ package it.cavallium.dbengine.database.memory; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.client.BadBlock; -import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.ExtraKeyOperationResult; import it.cavallium.dbengine.database.LLDelta; import it.cavallium.dbengine.database.LLDictionary; @@ -14,7 +13,6 @@ import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLSnapshot; import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.UpdateMode; -import it.cavallium.dbengine.database.disk.ReleasableSlice; import it.cavallium.dbengine.database.serialization.BiSerializationFunction; import it.cavallium.dbengine.database.serialization.SerializationException; import it.cavallium.dbengine.database.serialization.SerializationFunction; @@ -22,13 +20,10 @@ import it.unimi.dsi.fastutil.bytes.ByteList; import java.io.IOException; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.BiFunction; -import java.util.function.Function; import org.jetbrains.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryKeyValueDatabase.java b/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryKeyValueDatabase.java index 9cf45e4..be8edff 100644 --- a/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryKeyValueDatabase.java +++ b/src/main/java/it/cavallium/dbengine/database/memory/LLMemoryKeyValueDatabase.java @@ -1,29 +1,18 @@ package it.cavallium.dbengine.database.memory; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import it.cavallium.dbengine.client.DatabaseOptions; +import io.netty5.buffer.api.BufferAllocator; import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLKeyValueDatabase; -import it.cavallium.dbengine.database.LLKeyValueDatabaseStructure; import it.cavallium.dbengine.database.LLSingleton; import it.cavallium.dbengine.database.LLSnapshot; -import it.cavallium.dbengine.database.LLSnapshottable; import it.cavallium.dbengine.database.UpdateMode; import it.unimi.dsi.fastutil.bytes.ByteList; import java.nio.charset.StandardCharsets; -import java.nio.file.Path; import java.util.List; -import java.util.Map; -import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.atomic.AtomicLong; -import org.jetbrains.annotations.Nullable; -import org.rocksdb.ColumnFamilyHandle; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public class LLMemoryKeyValueDatabase implements LLKeyValueDatabase { diff --git a/src/main/java/it/cavallium/dbengine/database/memory/LLMemorySingleton.java b/src/main/java/it/cavallium/dbengine/database/memory/LLMemorySingleton.java index fdfcd93..45c28e9 100644 --- a/src/main/java/it/cavallium/dbengine/database/memory/LLMemorySingleton.java +++ b/src/main/java/it/cavallium/dbengine/database/memory/LLMemorySingleton.java @@ -1,8 +1,7 @@ package it.cavallium.dbengine.database.memory; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.Unpooled; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLDictionaryResultType; import it.cavallium.dbengine.database.LLSingleton; import it.cavallium.dbengine.database.LLSnapshot; diff --git a/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataInput.java b/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataInput.java index 7099a5e..b53fb2f 100644 --- a/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataInput.java +++ b/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataInput.java @@ -1,11 +1,9 @@ package it.cavallium.dbengine.database.serialization; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; -import it.cavallium.dbengine.database.LLUtils; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.SafeCloseable; import java.io.DataInput; -import java.io.IOException; import java.nio.charset.StandardCharsets; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataOutput.java b/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataOutput.java index af5bb9d..d354634 100644 --- a/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataOutput.java +++ b/src/main/java/it/cavallium/dbengine/database/serialization/BufferDataOutput.java @@ -1,11 +1,7 @@ package it.cavallium.dbengine.database.serialization; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; -import it.cavallium.dbengine.database.LLUtils; -import it.cavallium.dbengine.database.SafeCloseable; +import io.netty5.buffer.api.Buffer; import java.io.DataOutput; -import java.io.IOException; import java.nio.charset.StandardCharsets; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/database/serialization/CodecSerializer.java b/src/main/java/it/cavallium/dbengine/database/serialization/CodecSerializer.java index 08a6eaa..fcb531f 100644 --- a/src/main/java/it/cavallium/dbengine/database/serialization/CodecSerializer.java +++ b/src/main/java/it/cavallium/dbengine/database/serialization/CodecSerializer.java @@ -1,8 +1,8 @@ package it.cavallium.dbengine.database.serialization; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import java.io.IOError; import java.io.IOException; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/database/serialization/Serializer.java b/src/main/java/it/cavallium/dbengine/database/serialization/Serializer.java index 4d54148..b175ab3 100644 --- a/src/main/java/it/cavallium/dbengine/database/serialization/Serializer.java +++ b/src/main/java/it/cavallium/dbengine/database/serialization/Serializer.java @@ -1,8 +1,8 @@ package it.cavallium.dbengine.database.serialization; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLUtils; import java.nio.charset.StandardCharsets; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/database/serialization/SerializerFixedBinaryLength.java b/src/main/java/it/cavallium/dbengine/database/serialization/SerializerFixedBinaryLength.java index 24ceb1d..c1c1e80 100644 --- a/src/main/java/it/cavallium/dbengine/database/serialization/SerializerFixedBinaryLength.java +++ b/src/main/java/it/cavallium/dbengine/database/serialization/SerializerFixedBinaryLength.java @@ -1,8 +1,8 @@ package it.cavallium.dbengine.database.serialization; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.database.LLUtils; import java.nio.charset.StandardCharsets; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoring.java b/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoring.java index 7873101..5fae52f 100644 --- a/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoring.java +++ b/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoring.java @@ -1,12 +1,14 @@ package it.cavallium.dbengine.netty; +import io.netty5.buffer.api.pool.BufferAllocatorMetric; + public class JMXNettyMonitoring implements JMXNettyMonitoringMBean { private final String name; protected final boolean direct; - private final io.netty.buffer.api.pool.BufferAllocatorMetric metric; + private final BufferAllocatorMetric metric; - public JMXNettyMonitoring(String name, boolean direct, io.netty.buffer.api.pool.BufferAllocatorMetric metric) { + public JMXNettyMonitoring(String name, boolean direct, BufferAllocatorMetric metric) { this.name = name; this.direct = direct; this.metric = metric; diff --git a/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoringManager.java b/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoringManager.java index b14b774..12b130b 100644 --- a/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoringManager.java +++ b/src/main/java/it/cavallium/dbengine/netty/JMXNettyMonitoringManager.java @@ -1,17 +1,9 @@ package it.cavallium.dbengine.netty; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.PoolArenaMetric; -import io.netty.buffer.PooledByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocatorMetric; -import io.netty.buffer.UnpooledByteBufAllocator; -import io.netty.buffer.api.pool.PooledBufferAllocator; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.pool.PooledBufferAllocator; import java.lang.management.ManagementFactory; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Stream; import javax.management.InstanceAlreadyExistsException; import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; diff --git a/src/main/java/it/cavallium/dbengine/netty/JMXPoolArenaNettyMonitoring.java b/src/main/java/it/cavallium/dbengine/netty/JMXPoolArenaNettyMonitoring.java index 567bfea..ca47b8b 100644 --- a/src/main/java/it/cavallium/dbengine/netty/JMXPoolArenaNettyMonitoring.java +++ b/src/main/java/it/cavallium/dbengine/netty/JMXPoolArenaNettyMonitoring.java @@ -1,6 +1,6 @@ package it.cavallium.dbengine.netty; -import io.netty.buffer.PoolArenaMetric; +import io.netty5.buffer.PoolArenaMetric; public class JMXPoolArenaNettyMonitoring implements JMXPoolArenaNettyMonitoringMBean { diff --git a/src/main/java/it/cavallium/dbengine/netty/JMXPooledNettyMonitoring.java b/src/main/java/it/cavallium/dbengine/netty/JMXPooledNettyMonitoring.java index 249c590..15160df 100644 --- a/src/main/java/it/cavallium/dbengine/netty/JMXPooledNettyMonitoring.java +++ b/src/main/java/it/cavallium/dbengine/netty/JMXPooledNettyMonitoring.java @@ -1,8 +1,7 @@ package it.cavallium.dbengine.netty; -import io.netty.buffer.api.pool.BufferAllocatorMetric; -import io.netty.buffer.api.pool.BufferAllocatorMetric; -import io.netty.buffer.api.pool.PooledBufferAllocator; +import io.netty5.buffer.api.pool.BufferAllocatorMetric; +import io.netty5.buffer.api.pool.PooledBufferAllocator; import java.lang.reflect.Field; public class JMXPooledNettyMonitoring extends JMXNettyMonitoring implements JMXNettyMonitoringMBean { diff --git a/src/main/java/org/rocksdb/CappedWriteBatch.java b/src/main/java/org/rocksdb/CappedWriteBatch.java index 2ce2208..f576704 100644 --- a/src/main/java/org/rocksdb/CappedWriteBatch.java +++ b/src/main/java/org/rocksdb/CappedWriteBatch.java @@ -2,21 +2,14 @@ package org.rocksdb; import static it.cavallium.dbengine.database.LLUtils.isDirect; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.Send; -import io.netty.util.internal.PlatformDependent; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.BufferAllocator; +import io.netty5.buffer.api.Send; +import io.netty5.util.internal.PlatformDependent; import it.cavallium.dbengine.database.LLUtils; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import org.rocksdb.AbstractWriteBatch; -import org.rocksdb.ColumnFamilyHandle; -import org.rocksdb.RocksDB; -import org.rocksdb.RocksDBException; -import org.rocksdb.WriteBatch; -import org.rocksdb.WriteBatchInterface; -import org.rocksdb.WriteOptions; import org.warp.commonutils.concurrency.atomicity.NotAtomic; @NotAtomic diff --git a/src/test/java/it/cavallium/dbengine/DbTestUtils.java b/src/test/java/it/cavallium/dbengine/DbTestUtils.java index f530709..449b9c1 100644 --- a/src/test/java/it/cavallium/dbengine/DbTestUtils.java +++ b/src/test/java/it/cavallium/dbengine/DbTestUtils.java @@ -2,12 +2,12 @@ package it.cavallium.dbengine; import static org.junit.jupiter.api.Assertions.assertEquals; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.MemoryManager; -import io.netty.buffer.api.Send; -import io.netty.buffer.api.pool.BufferAllocatorMetric; -import io.netty.buffer.api.pool.PooledBufferAllocator; -import io.netty.util.internal.PlatformDependent; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.MemoryManager; +import io.netty5.buffer.api.Send; +import io.netty5.buffer.api.pool.BufferAllocatorMetric; +import io.netty5.buffer.api.pool.PooledBufferAllocator; +import io.netty5.util.internal.PlatformDependent; import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.LLDatabaseConnection; import it.cavallium.dbengine.database.LLDictionary; diff --git a/src/test/java/it/cavallium/dbengine/TestLLDictionaryLeaks.java b/src/test/java/it/cavallium/dbengine/TestLLDictionaryLeaks.java index 7259190..b621f2c 100644 --- a/src/test/java/it/cavallium/dbengine/TestLLDictionaryLeaks.java +++ b/src/test/java/it/cavallium/dbengine/TestLLDictionaryLeaks.java @@ -6,9 +6,8 @@ import static it.cavallium.dbengine.DbTestUtils.newAllocator; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.api.Buffer; -import io.netty.buffer.api.Send; +import io.netty5.buffer.api.Buffer; +import io.netty5.buffer.api.Send; import it.cavallium.dbengine.DbTestUtils.TempDb; import it.cavallium.dbengine.DbTestUtils.TestAllocator; import it.cavallium.dbengine.database.LLDictionary; @@ -17,15 +16,11 @@ import it.cavallium.dbengine.database.LLKeyValueDatabase; import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.UpdateMode; import it.cavallium.dbengine.database.UpdateReturnMode; -import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Objects; -import java.util.concurrent.Flow.Publisher; import java.util.stream.Stream; -import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; diff --git a/src/test/java/it/cavallium/dbengine/database/collections/TestRanges.java b/src/test/java/it/cavallium/dbengine/database/collections/TestRanges.java index 956a6e4..acbdbce 100644 --- a/src/test/java/it/cavallium/dbengine/database/collections/TestRanges.java +++ b/src/test/java/it/cavallium/dbengine/database/collections/TestRanges.java @@ -1,17 +1,14 @@ package it.cavallium.dbengine.database.collections; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; -import io.netty.buffer.Unpooled; -import io.netty.buffer.api.BufferAllocator; -import io.netty.buffer.api.pool.PooledBufferAllocator; +import io.netty5.buffer.Unpooled; +import io.netty5.buffer.api.BufferAllocator; import it.cavallium.dbengine.database.LLUtils; import java.util.Arrays; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import static io.netty.buffer.Unpooled.*; +import static io.netty5.buffer.Unpooled.*; public class TestRanges {