diff --git a/configs/src/main/scala/swaydb/configs/level/DefaultEventuallyPersistentConfig.scala b/configs/src/main/scala/swaydb/configs/level/DefaultEventuallyPersistentConfig.scala index 65243311d..80cbdc2b6 100644 --- a/configs/src/main/scala/swaydb/configs/level/DefaultEventuallyPersistentConfig.scala +++ b/configs/src/main/scala/swaydb/configs/level/DefaultEventuallyPersistentConfig.scala @@ -20,7 +20,6 @@ import com.typesafe.scalalogging.LazyLogging import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.Dir import java.nio.file.Path diff --git a/configs/src/main/scala/swaydb/configs/level/DefaultMemoryConfig.scala b/configs/src/main/scala/swaydb/configs/level/DefaultMemoryConfig.scala index 280e116aa..0a90e23ed 100644 --- a/configs/src/main/scala/swaydb/configs/level/DefaultMemoryConfig.scala +++ b/configs/src/main/scala/swaydb/configs/level/DefaultMemoryConfig.scala @@ -20,7 +20,6 @@ import com.typesafe.scalalogging.LazyLogging import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.config.{Atomic, OptimiseWrites} import scala.concurrent.duration._ diff --git a/configs/src/main/scala/swaydb/configs/level/DefaultPersistentConfig.scala b/configs/src/main/scala/swaydb/configs/level/DefaultPersistentConfig.scala index 1ee9b9715..cbf2a3a6f 100644 --- a/configs/src/main/scala/swaydb/configs/level/DefaultPersistentConfig.scala +++ b/configs/src/main/scala/swaydb/configs/level/DefaultPersistentConfig.scala @@ -20,7 +20,6 @@ import com.typesafe.scalalogging.LazyLogging import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.Dir import java.nio.file.Path diff --git a/core-cache/src/test/scala/swaydb/core/cache/CacheSpec.scala b/core-cache/src/test/scala/swaydb/core/cache/CacheSpec.scala index c6d1192b9..cc0a51060 100644 --- a/core-cache/src/test/scala/swaydb/core/cache/CacheSpec.scala +++ b/core-cache/src/test/scala/swaydb/core/cache/CacheSpec.scala @@ -26,7 +26,6 @@ import swaydb.testkit.RunThis._ import swaydb.{Error, IO} import scala.annotation.tailrec -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/core-cache/src/test/scala/swaydb/core/cache/LazySpec.scala b/core-cache/src/test/scala/swaydb/core/cache/LazySpec.scala index c3c78ddd6..19dd29c6b 100644 --- a/core-cache/src/test/scala/swaydb/core/cache/LazySpec.scala +++ b/core-cache/src/test/scala/swaydb/core/cache/LazySpec.scala @@ -23,7 +23,6 @@ import swaydb.IO import swaydb.effect.Base._ import swaydb.testkit.RunThis._ -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ import scala.util.Random diff --git a/core-compression/src/test/scala/swaydb/core/compression/CompressionSpec.scala b/core-compression/src/test/scala/swaydb/core/compression/CompressionSpec.scala index cb02c6e74..459644cb1 100644 --- a/core-compression/src/test/scala/swaydb/core/compression/CompressionSpec.scala +++ b/core-compression/src/test/scala/swaydb/core/compression/CompressionSpec.scala @@ -19,9 +19,9 @@ package swaydb.compression import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.compression.CompressionTestGen._ -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.utils.ByteSizeOf import scala.util.Random diff --git a/core-interop/src/main/scala/swaydb/config/ConfigWizard.scala b/core-interop/src/main/scala/swaydb/config/ConfigWizard.scala index 98c2a0c39..ad5913130 100644 --- a/core-interop/src/main/scala/swaydb/config/ConfigWizard.scala +++ b/core-interop/src/main/scala/swaydb/config/ConfigWizard.scala @@ -17,10 +17,9 @@ package swaydb.config import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config.builder.{MemoryLevelConfigBuilder, MemoryLevelZeroConfigBuilder, PersistentLevelConfigBuilder, PersistentLevelZeroConfigBuilder} +import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config.storage.Level0Storage -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.Dir import swaydb.utils.Java.JavaFunction diff --git a/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelConfigBuilder.scala b/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelConfigBuilder.scala index 2fb2662a4..a69267a0b 100644 --- a/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelConfigBuilder.scala +++ b/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelConfigBuilder.scala @@ -16,8 +16,8 @@ package swaydb.config.builder -import swaydb.config.compaction.{LevelMeter, LevelThrottle} import swaydb.config.MemoryLevelConfig +import swaydb.config.compaction.{LevelMeter, LevelThrottle} import swaydb.utils.Java.JavaFunction import java.time.Duration diff --git a/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelZeroConfigBuilder.scala b/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelZeroConfigBuilder.scala index 8088ae7b9..022ce0abd 100644 --- a/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelZeroConfigBuilder.scala +++ b/core-interop/src/main/scala/swaydb/config/builder/MemoryLevelZeroConfigBuilder.scala @@ -18,8 +18,7 @@ package swaydb.config.builder import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.LevelZeroThrottle -import swaydb.config.ConfigWizard -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.config.{Atomic, ConfigWizard, OptimiseWrites} import swaydb.utils.Java.JavaFunction /** diff --git a/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelConfigBuilder.scala b/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelConfigBuilder.scala index c2beed192..dd21983f4 100644 --- a/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelConfigBuilder.scala +++ b/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelConfigBuilder.scala @@ -16,8 +16,8 @@ package swaydb.config.builder -import swaydb.config.compaction.{LevelMeter, LevelThrottle} import swaydb.config._ +import swaydb.config.compaction.{LevelMeter, LevelThrottle} import swaydb.effect.Dir import swaydb.utils.Java.JavaFunction diff --git a/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelZeroConfigBuilder.scala b/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelZeroConfigBuilder.scala index 7ae337020..403ef1b01 100644 --- a/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelZeroConfigBuilder.scala +++ b/core-interop/src/main/scala/swaydb/config/builder/PersistentLevelZeroConfigBuilder.scala @@ -18,8 +18,7 @@ package swaydb.config.builder import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.LevelZeroThrottle -import swaydb.config.{ConfigWizard, MMAP, RecoveryMode} -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.config._ import swaydb.utils.Java.JavaFunction import java.nio.file.Path diff --git a/core-interop/src/main/scala/swaydb/config/repairAppendix/SegmentInfo.scala b/core-interop/src/main/scala/swaydb/config/repairAppendix/SegmentInfo.scala index 34e535af6..865ea1f4f 100644 --- a/core-interop/src/main/scala/swaydb/config/repairAppendix/SegmentInfo.scala +++ b/core-interop/src/main/scala/swaydb/config/repairAppendix/SegmentInfo.scala @@ -16,8 +16,7 @@ package swaydb.config.repairAppendix -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.slice.{MaxKey, Slice} import java.nio.file.Path diff --git a/core-interop/src/test/scala/swaydb/MaxKeySpec.scala b/core-interop/src/test/scala/swaydb/MaxKeySpec.scala index d7235b614..ee48034cf 100644 --- a/core-interop/src/test/scala/swaydb/MaxKeySpec.scala +++ b/core-interop/src/test/scala/swaydb/MaxKeySpec.scala @@ -2,9 +2,8 @@ package swaydb import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec -import swaydb.slice.MaxKey +import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice class MaxKeySpec extends AnyWordSpec with Matchers { diff --git a/core-performance/src/test/scala/swaydb/core/actor/ActorPerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/actor/ActorPerformanceSpec.scala index 4050dff90..44b2fa0b2 100644 --- a/core-performance/src/test/scala/swaydb/core/actor/ActorPerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/actor/ActorPerformanceSpec.scala @@ -20,11 +20,9 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.ActorConfig.QueueOrder import swaydb.core.TestExecutionContext -import swaydb.Benchmark -import swaydb.{Actor, ActorRef} +import swaydb.{Actor, ActorRef, Benchmark} import java.util.concurrent.ConcurrentLinkedQueue -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ class ActorPerformanceSpec extends AnyWordSpec with Matchers { diff --git a/core-performance/src/test/scala/swaydb/core/cache/CachePerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/cache/CachePerformanceSpec.scala index da289ea68..533965bd0 100644 --- a/core-performance/src/test/scala/swaydb/core/cache/CachePerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/cache/CachePerformanceSpec.scala @@ -19,15 +19,11 @@ package swaydb.core.cache import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.Error.Segment.ExceptionHandler -import swaydb.IO -import swaydb.core.cache.Cache +import swaydb.{Benchmark, IO} import swaydb.core.CommonAssertions._ -import swaydb.Benchmark import swaydb.effect.Reserve import swaydb.testkit.RunThis._ -import scala.collection.parallel.CollectionConverters._ - class CachePerformanceSpec extends AnyWordSpec with Matchers { val range = 1 to 1000000 diff --git a/core-performance/src/test/scala/swaydb/core/file/BlockCachePerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/file/BlockCachePerformanceSpec.scala index ec55bca5a..8179bcbf4 100644 --- a/core-performance/src/test/scala/swaydb/core/file/BlockCachePerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/file/BlockCachePerformanceSpec.scala @@ -16,10 +16,10 @@ package swaydb.core.file +import swaydb.Benchmark import swaydb.core.TestData._ import swaydb.core.segment.block.BlockCache import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper} import swaydb.utils.StorageUnits._ diff --git a/core-performance/src/test/scala/swaydb/core/file/DBFileWriteReadPerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/file/DBFileWriteReadPerformanceSpec.scala index 8a2d6af8b..e60564fbd 100644 --- a/core-performance/src/test/scala/swaydb/core/file/DBFileWriteReadPerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/file/DBFileWriteReadPerformanceSpec.scala @@ -16,13 +16,13 @@ package swaydb.core.file +import swaydb.Benchmark import swaydb.core.TestData._ -import swaydb.core.segment.block.{BlockCache, BlockCacheState} -import swaydb.core.segment.block.reader.BlockRefReader import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.segment.block.reader.BlockRefReader +import swaydb.core.segment.block.{BlockCache, BlockCacheState} import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper, TestSweeper} import swaydb.effect.{Effect, IOStrategy} import swaydb.utils.StorageUnits._ diff --git a/core-performance/src/test/scala/swaydb/core/file/ForceSavePerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/file/ForceSavePerformanceSpec.scala index c08988009..a23ae01b6 100644 --- a/core-performance/src/test/scala/swaydb/core/file/ForceSavePerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/file/ForceSavePerformanceSpec.scala @@ -16,11 +16,11 @@ package swaydb.core.file +import swaydb.Benchmark +import swaydb.config.ForceSave import swaydb.core.TestData.randomBytesSlice import swaydb.core.file.sweeper.ByteBufferCleaner -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.config.ForceSave import swaydb.effect.Effect import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core-performance/src/test/scala/swaydb/core/level/PathsDistributorPerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/level/PathsDistributorPerformanceSpec.scala index 7b48b1d28..008cf113f 100644 --- a/core-performance/src/test/scala/swaydb/core/level/PathsDistributorPerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/level/PathsDistributorPerformanceSpec.scala @@ -19,11 +19,10 @@ package swaydb.core.level import swaydb.IOValues._ import swaydb.core.TestCaseSweeper._ import swaydb.core.segment.Segment -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.slice.order.KeyOrder -import swaydb.effect +import swaydb.{Benchmark, effect} import swaydb.effect.{Dir, Effect} +import swaydb.slice.order.KeyOrder import scala.util.Random diff --git a/core-performance/src/test/scala/swaydb/core/merge/SegmentMerge_Performance_Spec.scala b/core-performance/src/test/scala/swaydb/core/merge/SegmentMerge_Performance_Spec.scala index db6b8d950..cbf6fb0b8 100644 --- a/core-performance/src/test/scala/swaydb/core/merge/SegmentMerge_Performance_Spec.scala +++ b/core-performance/src/test/scala/swaydb/core/merge/SegmentMerge_Performance_Spec.scala @@ -16,11 +16,11 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.{Memory, Time} import swaydb.Benchmark +import swaydb.core.segment.data.{Memory, Time} import swaydb.core.{TestBase, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class SegmentMerge_Performance_Spec extends TestBase { diff --git a/core-performance/src/test/scala/swaydb/core/segment/SegmentReadPerformanceSpec.scala b/core-performance/src/test/scala/swaydb/core/segment/SegmentReadPerformanceSpec.scala index 65b888c32..47a15868e 100644 --- a/core-performance/src/test/scala/swaydb/core/segment/SegmentReadPerformanceSpec.scala +++ b/core-performance/src/test/scala/swaydb/core/segment/SegmentReadPerformanceSpec.scala @@ -16,29 +16,29 @@ package swaydb.core.segment +import swaydb.Benchmark +import swaydb.config.SegmentRefCacheLife +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.file.ForceSaveApplier import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.block.binarysearch.{BinarySearchEntryFormat, BinarySearchIndexBlockConfig} import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.HashIndexBlockConfig import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.entry.reader.PersistentReader import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestSweeper} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.SegmentRefCacheLife -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.effect.{Dir, IOAction, IOStrategy} +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis.FutureImplicits import swaydb.utils.StorageUnits._ diff --git a/core-queue/src/test/scala/swaydb/core/queue/VolatileQueueSpec.scala b/core-queue/src/test/scala/swaydb/core/queue/VolatileQueueSpec.scala index 4dfa8b747..e96e328ad 100644 --- a/core-queue/src/test/scala/swaydb/core/queue/VolatileQueueSpec.scala +++ b/core-queue/src/test/scala/swaydb/core/queue/VolatileQueueSpec.scala @@ -20,7 +20,6 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.testkit.RunThis._ -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.Future import scala.concurrent.duration.DurationInt import scala.util.Random diff --git a/core-series/src/main/scala/swaydb/core/series/growable/SeriesGrowableList.scala b/core-series/src/main/scala/swaydb/core/series/growable/SeriesGrowableList.scala index de60944ec..b51a8e6cf 100644 --- a/core-series/src/main/scala/swaydb/core/series/growable/SeriesGrowableList.scala +++ b/core-series/src/main/scala/swaydb/core/series/growable/SeriesGrowableList.scala @@ -55,7 +55,7 @@ private[swaydb] object SeriesGrowableList { } private[swaydb] class SeriesGrowableList[T >: Null : ClassTag] private(@volatile private var series: SeriesAppendableVolatile[SeriesAppendableVolatile[T]], - lengthPerSeries: Int) { self => + lengthPerSeries: Int) { self => @volatile private var _written = 0 diff --git a/core-skiplist/src/main/scala/swaydb/core/skiplist/AtomicRanges.scala b/core-skiplist/src/main/scala/swaydb/core/skiplist/AtomicRanges.scala index ad42a9ecd..b08c17752 100644 --- a/core-skiplist/src/main/scala/swaydb/core/skiplist/AtomicRanges.scala +++ b/core-skiplist/src/main/scala/swaydb/core/skiplist/AtomicRanges.scala @@ -19,10 +19,9 @@ package swaydb.core.skiplist import com.typesafe.scalalogging.LazyLogging import swaydb.Bag import swaydb.Bag.Implicits._ -import swaydb.slice.MaxKey -import swaydb.effect.Reserve import swaydb.core.skiplist.AtomicRanges.{Action, Value} -import swaydb.slice.Slice +import swaydb.effect.Reserve +import swaydb.slice.{MaxKey, Slice} import java.util.concurrent.ConcurrentSkipListMap import java.util.concurrent.atomic.AtomicLong @@ -275,7 +274,7 @@ private[swaydb] case object AtomicRanges extends LazyLogging { } private[swaydb] class AtomicRanges[K](private val transactions: ConcurrentSkipListMap[AtomicRanges.Key[K], Value[Reserve[Unit]]])(implicit val keyRangeOrdering: Ordering[AtomicRanges.Key[K]], - keyOrder: Ordering[K]) { + keyOrder: Ordering[K]) { private implicit val self: AtomicRanges[K] = this diff --git a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrent.scala b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrent.scala index 9d8387add..4ab524b3c 100644 --- a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrent.scala +++ b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrent.scala @@ -32,8 +32,8 @@ object SkipListConcurrent { } private[swaydb] class SkipListConcurrent[OK, OV, K <: OK, V <: OV] private(@volatile protected var skipList: ConcurrentSkipListMap[K, V], - val nullKey: OK, - val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipListNavigable[OK, OV, K, V](skipList.size()) with SkipListBatchable[OK, OV, K, V] { + val nullKey: OK, + val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipListNavigable[OK, OV, K, V](skipList.size()) with SkipListBatchable[OK, OV, K, V] { /** * Does not support concurrent batch writes since it's only being used by [[swaydb.core.level.Level]] which diff --git a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrentLimit.scala b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrentLimit.scala index 61d075004..be5d6da18 100644 --- a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrentLimit.scala +++ b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListConcurrentLimit.scala @@ -16,8 +16,8 @@ package swaydb.core.skiplist -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import java.util import scala.collection.mutable @@ -42,9 +42,9 @@ object SkipListConcurrentLimit { } private[swaydb] class SkipListConcurrentLimit[OK, OV, K <: OK, V <: OV](limit: Int, - skipList: SkipListConcurrent[OK, OV, K, V], - val nullKey: OK, - val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipList[OK, OV, K, V] { + skipList: SkipListConcurrent[OK, OV, K, V], + val nullKey: OK, + val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipList[OK, OV, K, V] { def dropOverflow(key: K): Unit = while (skipList.size > limit) diff --git a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListNavigable.scala b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListNavigable.scala index 0cb0a7b79..12f116f06 100644 --- a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListNavigable.scala +++ b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListNavigable.scala @@ -16,9 +16,9 @@ package swaydb.core.skiplist -import swaydb.utils.NullOps -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.NullOps import java.util import java.util.Map diff --git a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListSeries.scala b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListSeries.scala index fe612fe68..dc4e78fd5 100644 --- a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListSeries.scala +++ b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListSeries.scala @@ -231,10 +231,10 @@ private[swaydb] object SkipListSeries { * */ private[swaydb] class SkipListSeries[OK, OV, K <: OK, V <: OV] private(@volatile private[skiplist] var series: SeriesGrowableList[KeyValue.Some[K, V]], - //maintain a count of number of removed items i.e. value is null. - @volatile private[skiplist] var _removed: Int, - val nullKey: OK, - val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipList[OK, OV, K, V] with LazyLogging { self => + //maintain a count of number of removed items i.e. value is null. + @volatile private[skiplist] var _removed: Int, + val nullKey: OK, + val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipList[OK, OV, K, V] with LazyLogging { self => private val randomWriteWarning = WhenOccurs(500)(times => logger.warn(SkipListSeries.randomWriteWarning(times))) diff --git a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListTreeMap.scala b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListTreeMap.scala index 4900105bf..ae0cc7e06 100644 --- a/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListTreeMap.scala +++ b/core-skiplist/src/main/scala/swaydb/core/skiplist/SkipListTreeMap.scala @@ -33,8 +33,8 @@ object SkipListTreeMap { } private[swaydb] class SkipListTreeMap[OK, OV, K <: OK, V <: OV] private(protected val skipList: util.TreeMap[K, V], - val nullKey: OK, - val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipListNavigable[OK, OV, K, V](skipList.size()) { + val nullKey: OK, + val nullValue: OV)(implicit val keyOrder: KeyOrder[K]) extends SkipListNavigable[OK, OV, K, V](skipList.size()) { override def remove(key: K): Unit = throw new IllegalAccessException("Operation not allowed - TreeMap SkipList") diff --git a/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSeriesSpec.scala b/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSeriesSpec.scala index b81282b02..161d81c1f 100644 --- a/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSeriesSpec.scala +++ b/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSeriesSpec.scala @@ -18,10 +18,10 @@ package swaydb.core.skiplist import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec -import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.KeyOrder +import swaydb.slice.{Slice, SliceOption} import scala.util.Random diff --git a/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSpec.scala b/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSpec.scala index 066fd9a8a..699e46028 100644 --- a/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSpec.scala +++ b/core-skiplist/src/test/scala/swaydb/core/skiplist/SkipListSpec.scala @@ -18,20 +18,12 @@ package swaydb.core.skiplist import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec -import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ -import swaydb.testkit.RunThis._ -import swaydb.{Bag, Glass} +import swaydb.slice.order.KeyOrder +import swaydb.slice.{Slice, SliceOption} -import java.util.concurrent.ConcurrentSkipListMap -import java.util.concurrent.atomic.AtomicBoolean -import scala.collection.parallel.CollectionConverters._ -import scala.concurrent.Future -import scala.concurrent.duration.DurationInt -import scala.jdk.CollectionConverters._ -import scala.util.{Random, Try} +import scala.util.Random class Concurrent_SkipListSpec extends SkipListSpec { override def create[NK, NV, K <: NK, V <: NV](nullKey: NK, nullValue: NV)(implicit keyOrder: KeyOrder[K]): SkipList[NK, NV, K, V] = @@ -237,78 +229,78 @@ sealed trait SkipListSpec extends AnyWordSpec with Matchers { assertThrows[IllegalArgumentException](skipList.subMap(from = 1, fromInclusive = false, to = 0, toInclusive = false)) } -// "result same as ConcurrentSkipListMap" in { -// runThis(100.times, log = true) { -// val scalaSkipList = create() -// val javaSkipList = new ConcurrentSkipListMap[Slice[Byte], Value.Some](ordering) -// -// val max = randomIntMax(100) -// -// (1 to max) foreach { -// i => -// scalaSkipList.put(i, Value.Some(i)) -// javaSkipList.put(i, Value.Some(i)) -// } -// -// runThis(10.times) { -// val from = eitherOne(0, randomIntMax(max max 1)) -// val to = eitherOne(from, from + 1, randomIntMax(max max 1) max from, from + randomIntMax(max max 1)) -// -// runThis(20.times) { -// val fromInclusive = randomBoolean() -// val toInclusive = randomBoolean() -// -// val scalaResult: List[(Slice[Byte], Value.Some)] = scalaSkipList.subMap(from, fromInclusive, to, toInclusive).toList -// val javaResult: List[(Slice[Byte], Value.Some)] = javaSkipList.subMap(from, fromInclusive, to, toInclusive).asScala.toList -// -// scalaResult shouldBe javaResult -// } -// } -// } -// } + // "result same as ConcurrentSkipListMap" in { + // runThis(100.times, log = true) { + // val scalaSkipList = create() + // val javaSkipList = new ConcurrentSkipListMap[Slice[Byte], Value.Some](ordering) + // + // val max = randomIntMax(100) + // + // (1 to max) foreach { + // i => + // scalaSkipList.put(i, Value.Some(i)) + // javaSkipList.put(i, Value.Some(i)) + // } + // + // runThis(10.times) { + // val from = eitherOne(0, randomIntMax(max max 1)) + // val to = eitherOne(from, from + 1, randomIntMax(max max 1) max from, from + randomIntMax(max max 1)) + // + // runThis(20.times) { + // val fromInclusive = randomBoolean() + // val toInclusive = randomBoolean() + // + // val scalaResult: List[(Slice[Byte], Value.Some)] = scalaSkipList.subMap(from, fromInclusive, to, toInclusive).toList + // val javaResult: List[(Slice[Byte], Value.Some)] = javaSkipList.subMap(from, fromInclusive, to, toInclusive).asScala.toList + // + // scalaResult shouldBe javaResult + // } + // } + // } + // } } -// "transaction" should { -// -// def runTest[BAG[_]](await: BAG[Unit] => Unit)(implicit bag: Bag[BAG]) = { -// val skipList = create[Int, AtomicBoolean, Int, AtomicBoolean](Int.MinValue, null)(KeyOrder(Ordering.Int)) -// -// skipList.put(1, new AtomicBoolean(false)) -// -// (1 to 1000).par foreach { -// _ => -// val result = -// skipList.atomicWrite(from = 1, to = 1, toInclusive = true) { -// val boolean = skipList.get(1) -// -// //when this code block is executed boolean is always false! -// boolean.get() shouldBe false -// boolean.set(true) -// -// //allow some time for threads to concurrently access this value -// eitherOne(sleep(randomIntMax(10).milliseconds), ()) -// -// boolean.set(false) -// } -// -// await(result) -// } -// } -// -// "not allow concurrent updated" when { -// //run for each bag -// -// "glass" in { -// runTest[Glass](result => result) -// } -// -// "try" in { -// runTest[Try](_.get) -// } -// -// "future" in { -// runTest[Future](_.await(10.seconds))(Bag.future(TestExecutionContext.executionContext)) -// } -// } -// } + // "transaction" should { + // + // def runTest[BAG[_]](await: BAG[Unit] => Unit)(implicit bag: Bag[BAG]) = { + // val skipList = create[Int, AtomicBoolean, Int, AtomicBoolean](Int.MinValue, null)(KeyOrder(Ordering.Int)) + // + // skipList.put(1, new AtomicBoolean(false)) + // + // (1 to 1000).par foreach { + // _ => + // val result = + // skipList.atomicWrite(from = 1, to = 1, toInclusive = true) { + // val boolean = skipList.get(1) + // + // //when this code block is executed boolean is always false! + // boolean.get() shouldBe false + // boolean.set(true) + // + // //allow some time for threads to concurrently access this value + // eitherOne(sleep(randomIntMax(10).milliseconds), ()) + // + // boolean.set(false) + // } + // + // await(result) + // } + // } + // + // "not allow concurrent updated" when { + // //run for each bag + // + // "glass" in { + // runTest[Glass](result => result) + // } + // + // "try" in { + // runTest[Try](_.get) + // } + // + // "future" in { + // runTest[Future](_.await(10.seconds))(Bag.future(TestExecutionContext.executionContext)) + // } + // } + // } } diff --git a/core-tools/src/main/scala/swaydb/core/tool/AppendixRepairer.scala b/core-tools/src/main/scala/swaydb/core/tool/AppendixRepairer.scala index 130e752f3..285ef9b08 100644 --- a/core-tools/src/main/scala/swaydb/core/tool/AppendixRepairer.scala +++ b/core-tools/src/main/scala/swaydb/core/tool/AppendixRepairer.scala @@ -19,21 +19,21 @@ package swaydb.core.tool import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Level.ExceptionHandler import swaydb.IO +import swaydb.config.repairAppendix.AppendixRepairStrategy._ +import swaydb.config.repairAppendix.{AppendixRepairStrategy, OverlappingSegmentsException, SegmentInfoUnTyped} +import swaydb.config.{ForceSave, MMAP} import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.AppendixLogCache import swaydb.core.log.serialiser.LogEntryWriter import swaydb.core.log.{Log, LogEntry} import swaydb.core.segment.Segment -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.config.{ForceSave, MMAP} -import swaydb.slice.order.KeyOrder -import swaydb.config.repairAppendix.AppendixRepairStrategy._ -import swaydb.config.repairAppendix.{AppendixRepairStrategy, OverlappingSegmentsException, SegmentInfoUnTyped} +import swaydb.effect.{Effect, Extension} import swaydb.slice.Slice import swaydb.slice.SliceIOImplicits._ -import swaydb.effect.{Effect, Extension} +import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ import java.nio.file.Path diff --git a/core-tools/src/test/scala/swaydb/core/tool/AppendixRepairerSpec.scala b/core-tools/src/test/scala/swaydb/core/tool/AppendixRepairerSpec.scala index bacaeae13..e82b28073 100644 --- a/core-tools/src/test/scala/swaydb/core/tool/AppendixRepairerSpec.scala +++ b/core-tools/src/test/scala/swaydb/core/tool/AppendixRepairerSpec.scala @@ -18,18 +18,18 @@ package swaydb.core.tool import swaydb.Glass import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.LevelThrottle +import swaydb.config.repairAppendix.{AppendixRepairStrategy, OverlappingSegmentsException} import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestForceSave} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.LevelThrottle -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.config.repairAppendix.{AppendixRepairStrategy, OverlappingSegmentsException} -import swaydb.slice.Slice import swaydb.effect.Effect import swaydb.effect.Effect._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/main/scala/swaydb/core/Core.scala b/core/src/main/scala/swaydb/core/Core.scala index 3f62ee194..9d2848d32 100644 --- a/core/src/main/scala/swaydb/core/Core.scala +++ b/core/src/main/scala/swaydb/core/Core.scala @@ -19,21 +19,21 @@ package swaydb.core import com.typesafe.scalalogging.LazyLogging import swaydb.Bag.Implicits._ import swaydb._ +import swaydb.config._ +import swaydb.config.accelerate.LevelZeroMeter +import swaydb.config.compaction.{CompactionConfig, LevelMeter} +import swaydb.config.sequencer.Sequencer import swaydb.core.build.BuildValidator -import swaydb.core.segment.data.{Memory, SwayFunction, Value} -import swaydb.core.segment.FunctionStore import swaydb.core.compaction.Compactor +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.level.zero.LevelZero import swaydb.core.log.LogEntry import swaydb.core.log.serialiser.LevelZeroLogEntryWriter import swaydb.core.log.timer.Timer +import swaydb.core.segment.FunctionStore +import swaydb.core.segment.data.{Memory, SwayFunction, Value} import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.config.accelerate.LevelZeroMeter -import swaydb.config.compaction.{CompactionConfig, LevelMeter} -import swaydb.config._ import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.config.sequencer.Sequencer import swaydb.slice.{Slice, SliceOption} import swaydb.utils.TupleOrNone diff --git a/core/src/main/scala/swaydb/core/CoreInitializer.scala b/core/src/main/scala/swaydb/core/CoreInitializer.scala index 3c900c17e..37ce69ed8 100644 --- a/core/src/main/scala/swaydb/core/CoreInitializer.scala +++ b/core/src/main/scala/swaydb/core/CoreInitializer.scala @@ -18,32 +18,30 @@ package swaydb.core import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Level.ExceptionHandler +import swaydb.config.compaction.CompactionConfig +import swaydb.config.sequencer.Sequencer +import swaydb.config.storage.{Level0Storage, LevelStorage} +import swaydb.config._ import swaydb.core.build.{Build, BuildValidator} -import swaydb.core.segment.FunctionStore -import swaydb.core.file.ForceSaveApplier import swaydb.core.compaction._ import swaydb.core.compaction.throttle.ThrottleCompactorCreator +import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} import swaydb.core.level.zero.LevelZero import swaydb.core.level.{Level, LevelCloser, NextLevel} -import swaydb.core.segment.block +import swaydb.core.segment.{FunctionStore, block} import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig -import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} -import swaydb.config.compaction.CompactionConfig -import swaydb.config._ -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.storage.{Level0Storage, LevelStorage} -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.ref.search.ThreadReadState import swaydb.effect.Effect._ import swaydb.effect.IOStrategy +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.StorageUnits._ import swaydb.{Bag, DefActor, Error, Glass, IO} diff --git a/core/src/main/scala/swaydb/core/build/Build.scala b/core/src/main/scala/swaydb/core/build/Build.scala index 0e455aa79..29ef34225 100644 --- a/core/src/main/scala/swaydb/core/build/Build.scala +++ b/core/src/main/scala/swaydb/core/build/Build.scala @@ -19,9 +19,9 @@ package swaydb.core.build import com.typesafe.scalalogging.LazyLogging import swaydb.IO import swaydb.config.DataType -import swaydb.slice.Slice import swaydb.effect.Effect import swaydb.macros.VersionReader +import swaydb.slice.Slice import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/build/BuildSerialiser.scala b/core/src/main/scala/swaydb/core/build/BuildSerialiser.scala index 60463b354..e680c5dba 100644 --- a/core/src/main/scala/swaydb/core/build/BuildSerialiser.scala +++ b/core/src/main/scala/swaydb/core/build/BuildSerialiser.scala @@ -16,8 +16,8 @@ package swaydb.core.build -import swaydb.core.util.CRC32 import swaydb.config.DataType +import swaydb.core.util.CRC32 import swaydb.slice.Slice import swaydb.utils.ByteSizeOf diff --git a/core/src/main/scala/swaydb/core/compaction/CompactorCreator.scala b/core/src/main/scala/swaydb/core/compaction/CompactorCreator.scala index 0c4a874d2..e5b591a90 100644 --- a/core/src/main/scala/swaydb/core/compaction/CompactorCreator.scala +++ b/core/src/main/scala/swaydb/core/compaction/CompactorCreator.scala @@ -16,9 +16,9 @@ package swaydb.core.compaction -import swaydb.core.level.zero.LevelZero -import swaydb.core.file.sweeper.FileSweeper import swaydb.config.compaction.CompactionConfig +import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.level.zero.LevelZero import swaydb.{DefActor, IO} /** diff --git a/core/src/main/scala/swaydb/core/compaction/io/CompactionIO.scala b/core/src/main/scala/swaydb/core/compaction/io/CompactionIO.scala index 59bdb58e1..374d9cfed 100644 --- a/core/src/main/scala/swaydb/core/compaction/io/CompactionIO.scala +++ b/core/src/main/scala/swaydb/core/compaction/io/CompactionIO.scala @@ -16,20 +16,19 @@ package swaydb.core.compaction.io -import swaydb.core.segment.data.KeyValue -import swaydb.core.segment.FunctionStore +import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.PathsDistributor -import swaydb.core.segment.Segment +import swaydb.core.segment.{FunctionStore, Segment} import swaydb.core.segment.block.segment.transient.TransientSegment +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.KeyValue import swaydb.core.segment.io.{SegmentReadIO, SegmentWriteIO} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper import swaydb.core.util.IDGenerator -import swaydb.config.{MMAP, SegmentRefCacheLife} -import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.{Actor, DefActor} import java.util.concurrent.ConcurrentHashMap diff --git a/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelTaskAssigner.scala b/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelTaskAssigner.scala index bd22e90fb..e854c9ba5 100644 --- a/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelTaskAssigner.scala +++ b/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelTaskAssigner.scala @@ -16,14 +16,14 @@ package swaydb.core.compaction.task.assigner -import swaydb.core.level.Level +import swaydb.config.compaction.PushStrategy import swaydb.core.compaction.task.CompactionDataType._ import swaydb.core.compaction.task.CompactionTask +import swaydb.core.level.Level import swaydb.core.segment.Segment -import swaydb.utils.NonEmptyList -import swaydb.config.compaction.PushStrategy -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.NonEmptyList case object LevelTaskAssigner { diff --git a/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner.scala b/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner.scala index c38af3c2b..886198a20 100644 --- a/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner.scala +++ b/core/src/main/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner.scala @@ -16,20 +16,19 @@ package swaydb.core.compaction.task.assigner -import swaydb.core.segment.data.{KeyValue, Memory} -import swaydb.core.segment.FunctionStore -import swaydb.core.level.Level +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.PushStrategy import swaydb.core.compaction.task.CompactionTask import swaydb.core.compaction.task.CompactionTask.CompactLogs +import swaydb.core.level.Level import swaydb.core.level.zero.LevelZero import swaydb.core.level.zero.LevelZero.LevelZeroLog +import swaydb.core.segment.FunctionStore +import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.data.merge.KeyValueMerger import swaydb.core.segment.data.merge.stats.MergeStats -import swaydb.core.segment.assigner.Assignable -import swaydb.slice.MaxKey -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.PushStrategy -import swaydb.slice.Slice +import swaydb.core.segment.data.{KeyValue, Memory} +import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.{Aggregator, Futures, NonEmptyList} diff --git a/core/src/main/scala/swaydb/core/compaction/task/assigner/TaskAssigner.scala b/core/src/main/scala/swaydb/core/compaction/task/assigner/TaskAssigner.scala index 74f9679a5..0da0f9637 100644 --- a/core/src/main/scala/swaydb/core/compaction/task/assigner/TaskAssigner.scala +++ b/core/src/main/scala/swaydb/core/compaction/task/assigner/TaskAssigner.scala @@ -16,16 +16,15 @@ package swaydb.core.compaction.task.assigner -import swaydb.core.segment.data.Value.FromValue -import swaydb.core.segment.data.{Memory, Time, Value} -import swaydb.core.level.Level +import swaydb.config.compaction.PushStrategy import swaydb.core.compaction.task.CompactionDataType._ import swaydb.core.compaction.task.{CompactionDataType, CompactionTask} +import swaydb.core.level.Level import swaydb.core.segment.Segment import swaydb.core.segment.assigner.{Assignable, Assigner, Assignment, AssignmentResult} -import swaydb.slice.MaxKey -import swaydb.config.compaction.PushStrategy -import swaydb.slice.Slice +import swaydb.core.segment.data.Value.FromValue +import swaydb.core.segment.data.{Memory, Time, Value} +import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.KeyOrder import swaydb.utils.{Aggregator, NonEmptyList} diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactor.scala b/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactor.scala index bc0bca9b8..267104536 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactor.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactor.scala @@ -18,10 +18,10 @@ package swaydb.core.compaction.throttle import com.typesafe.scalalogging.LazyLogging import swaydb.DefActor +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.compaction.Compactor import swaydb.core.compaction.throttle.behaviour._ import swaydb.core.file.sweeper.FileSweeper -import swaydb.config.compaction.CompactionConfig.CompactionParallelism import scala.concurrent.{ExecutionContext, Future} diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorContext.scala b/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorContext.scala index 641255c85..c6e550127 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorContext.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorContext.scala @@ -17,8 +17,8 @@ package swaydb.core.compaction.throttle import com.typesafe.scalalogging.LazyLogging -import swaydb.core.level.LevelRef import swaydb.config.compaction.CompactionConfig +import swaydb.core.level.LevelRef import swaydb.slice.Slice import java.util.TimerTask diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorCreator.scala b/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorCreator.scala index 5695d4b4b..b9842ce23 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorCreator.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/ThrottleCompactorCreator.scala @@ -18,12 +18,12 @@ package swaydb.core.compaction.throttle import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Level.ExceptionHandler -import swaydb.core.level.LevelRef +import swaydb.config.compaction.CompactionConfig import swaydb.core.compaction.throttle.behaviour.BehaviorWakeUp import swaydb.core.compaction.{Compactor, CompactorCreator} -import swaydb.core.level.zero.LevelZero import swaydb.core.file.sweeper.FileSweeper -import swaydb.config.compaction.CompactionConfig +import swaydb.core.level.LevelRef +import swaydb.core.level.zero.LevelZero import swaydb.slice.Slice import swaydb.{Actor, DefActor, Error, IO} diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviorWakeUp.scala b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviorWakeUp.scala index 97df720e8..cf1c0bdb2 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviorWakeUp.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviorWakeUp.scala @@ -18,19 +18,18 @@ package swaydb.core.compaction.throttle.behaviour import com.typesafe.scalalogging.LazyLogging import swaydb.DefActor -import swaydb.core.level._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.PushStrategy import swaydb.core.compaction.task.CompactionTask import swaydb.core.compaction.task.assigner.{LevelTaskAssigner, LevelZeroTaskAssigner} import swaydb.core.compaction.throttle.{LevelState, ThrottleCompactor, ThrottleCompactorContext, ThrottleLevelOrdering} -import swaydb.core.level.zero.LevelZero import swaydb.core.file.sweeper.FileSweeper -import swaydb.utils.NonEmptyList -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.PushStrategy +import swaydb.core.level._ +import swaydb.core.level.zero.LevelZero import swaydb.slice.Slice -import swaydb.utils.FiniteDurations import swaydb.utils.FiniteDurations.FiniteDurationImplicits import swaydb.utils.Futures.{FutureUnitImplicits, _} +import swaydb.utils.{FiniteDurations, NonEmptyList} import scala.concurrent.duration._ import scala.concurrent.{ExecutionContext, Future} diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCommit.scala b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCommit.scala index b5d3463bb..e4822b29c 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCommit.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCommit.scala @@ -18,12 +18,12 @@ package swaydb.core.compaction.throttle.behaviour import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Level.ExceptionHandler -import swaydb.core.util.DefIO import swaydb.core.level.Level import swaydb.core.level.zero.LevelZero import swaydb.core.level.zero.LevelZero.LevelZeroLog import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.{Segment, SegmentOption} +import swaydb.core.util.DefIO import swaydb.slice.Slice import swaydb.slice.SliceIOImplicits._ import swaydb.{Error, IO} diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask.scala b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask.scala index c52fa8c0d..45f3280e3 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask.scala @@ -17,14 +17,14 @@ package swaydb.core.compaction.throttle.behaviour import com.typesafe.scalalogging.LazyLogging -import swaydb.core.util.DefIO -import swaydb.core.level._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.compaction.io.CompactionIO import swaydb.core.compaction.task.CompactionTask +import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.level._ import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.{Segment, SegmentOption} -import swaydb.core.file.sweeper.FileSweeper -import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.core.util.DefIO import swaydb.slice.Slice import swaydb.utils.Futures import swaydb.utils.Futures.FutureImplicits diff --git a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/LevelSleepStates.scala b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/LevelSleepStates.scala index 8bdc89af5..2a9b2f537 100644 --- a/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/LevelSleepStates.scala +++ b/core/src/main/scala/swaydb/core/compaction/throttle/behaviour/LevelSleepStates.scala @@ -16,8 +16,8 @@ package swaydb.core.compaction.throttle.behaviour -import swaydb.core.level.Level import swaydb.core.compaction.throttle.LevelState +import swaydb.core.level.Level import swaydb.core.level.zero.LevelZero protected object LevelSleepStates { diff --git a/core/src/main/scala/swaydb/core/file/DBFile.scala b/core/src/main/scala/swaydb/core/file/DBFile.scala index 72224485f..bf220d9e2 100644 --- a/core/src/main/scala/swaydb/core/file/DBFile.scala +++ b/core/src/main/scala/swaydb/core/file/DBFile.scala @@ -18,12 +18,12 @@ package swaydb.core.file import com.typesafe.scalalogging.LazyLogging import swaydb.Error.IO.ExceptionHandler +import swaydb.config.ForceSave import swaydb.core.cache.Cache import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.config.ForceSave import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper, FileSweeperItem} -import swaydb.slice.{Slice, SliceRO} import swaydb.effect.{Effect, IOStrategy, Reserve} +import swaydb.slice.{Slice, SliceRO} import swaydb.{Error, IO} import java.nio.file.Path @@ -163,8 +163,8 @@ object DBFile extends LazyLogging { deleteAfterClean: Boolean, forceSave: ForceSave.MMAPFiles, bytes: Array[Slice[Byte]])(implicit fileSweeper: FileSweeper, - bufferCleaner: ByteBufferSweeperActor, - forceSaveApplier: ForceSaveApplier): DBFile = { + bufferCleaner: ByteBufferSweeperActor, + forceSaveApplier: ForceSaveApplier): DBFile = { val totalWritten = bytes.foldLeft(0) { //do not write bytes if the Slice has empty bytes. case (written, bytes) => diff --git a/core/src/main/scala/swaydb/core/file/MMAPFile.scala b/core/src/main/scala/swaydb/core/file/MMAPFile.scala index 78bf4e0c8..67aea2da1 100644 --- a/core/src/main/scala/swaydb/core/file/MMAPFile.scala +++ b/core/src/main/scala/swaydb/core/file/MMAPFile.scala @@ -17,11 +17,11 @@ package swaydb.core.file import com.typesafe.scalalogging.LazyLogging +import swaydb.config.ForceSave import swaydb.core.file.sweeper.ByteBufferSweeper import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.config.ForceSave -import swaydb.slice.{Slice, SliceRO, Slices} import swaydb.effect.{Effect, Reserve} +import swaydb.slice.{Slice, SliceRO, Slices} import java.nio.channels.FileChannel.MapMode import java.nio.channels.{FileChannel, WritableByteChannel} diff --git a/core/src/main/scala/swaydb/core/file/StandardFile.scala b/core/src/main/scala/swaydb/core/file/StandardFile.scala index f09f8f0c1..d315a8694 100644 --- a/core/src/main/scala/swaydb/core/file/StandardFile.scala +++ b/core/src/main/scala/swaydb/core/file/StandardFile.scala @@ -17,10 +17,10 @@ package swaydb.core.file import com.typesafe.scalalogging.LazyLogging -import swaydb.utils.Collections import swaydb.config.ForceSave -import swaydb.slice.{Slice, SliceRO, Slices} import swaydb.effect.Effect +import swaydb.slice.{Slice, SliceRO, Slices} +import swaydb.utils.Collections import java.nio.ByteBuffer import java.nio.channels.{FileChannel, GatheringByteChannel} diff --git a/core/src/main/scala/swaydb/core/file/reader/FileReader.scala b/core/src/main/scala/swaydb/core/file/reader/FileReader.scala index 553e73a05..dc647bba8 100644 --- a/core/src/main/scala/swaydb/core/file/reader/FileReader.scala +++ b/core/src/main/scala/swaydb/core/file/reader/FileReader.scala @@ -18,8 +18,8 @@ package swaydb.core.file.reader import com.typesafe.scalalogging.LazyLogging import swaydb.core.file.DBFile -import swaydb.slice.{Reader, Slice, SliceRO} import swaydb.slice.utils.ByteOps +import swaydb.slice.{Reader, Slice, SliceRO} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferCleaner.scala b/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferCleaner.scala index a753c293f..9b661a5da 100644 --- a/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferCleaner.scala +++ b/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferCleaner.scala @@ -19,8 +19,8 @@ package swaydb.core.file.sweeper import com.typesafe.scalalogging.LazyLogging import swaydb.IO import swaydb.IO.ExceptionHandler -import swaydb.core.file.ForceSaveApplier import swaydb.config.ForceSave +import swaydb.core.file.ForceSaveApplier import java.lang.invoke.{MethodHandle, MethodHandles, MethodType} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferSweeper.scala b/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferSweeper.scala index c664c3bc3..2cf2f7403 100644 --- a/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferSweeper.scala +++ b/core/src/main/scala/swaydb/core/file/sweeper/ByteBufferSweeper.scala @@ -21,12 +21,12 @@ import swaydb.ActorConfig.QueueOrder import swaydb.Bag.Implicits._ import swaydb.Error.IO.ExceptionHandler import swaydb._ +import swaydb.config.ForceSave import swaydb.core.cache.{Cache, CacheNoIO} import swaydb.core.file.ForceSaveApplier import swaydb.core.file.sweeper.ByteBufferCleaner.Cleaner -import swaydb.utils.English -import swaydb.config.ForceSave import swaydb.effect.Effect +import swaydb.utils.English import swaydb.utils.FiniteDurations.FiniteDurationImplicits import java.io.FileNotFoundException diff --git a/core/src/main/scala/swaydb/core/file/sweeper/FileSweeper.scala b/core/src/main/scala/swaydb/core/file/sweeper/FileSweeper.scala index 27d285412..fecf558a2 100644 --- a/core/src/main/scala/swaydb/core/file/sweeper/FileSweeper.scala +++ b/core/src/main/scala/swaydb/core/file/sweeper/FileSweeper.scala @@ -18,10 +18,10 @@ package swaydb.core.file.sweeper import com.typesafe.scalalogging.LazyLogging import swaydb.ActorConfig.QueueOrder import swaydb.Bag.Implicits._ +import swaydb.config.FileCache import swaydb.core.cache.CacheNoIO import swaydb.core.level.zero.LevelZero import swaydb.core.level.{LevelRef, NextLevel} -import swaydb.config.FileCache import swaydb.{Actor, ActorConfig, ActorRef, Bag, IO} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/level/Level.scala b/core/src/main/scala/swaydb/core/level/Level.scala index acd524942..94039f6e4 100644 --- a/core/src/main/scala/swaydb/core/level/Level.scala +++ b/core/src/main/scala/swaydb/core/level/Level.scala @@ -19,16 +19,17 @@ package swaydb.core.level import com.typesafe.scalalogging.LazyLogging import swaydb.Bag.Implicits._ import swaydb.Error.Level.ExceptionHandler -import swaydb.core.segment.data._ -import swaydb.core.segment.FunctionStore -import swaydb.core.file.ForceSaveApplier +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.{LevelMeter, LevelThrottle} +import swaydb.config.storage.LevelStorage import swaydb.core.compaction.io.CompactionIO +import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.seek._ import swaydb.core.level.zero.LevelZero.LevelZeroLog import swaydb.core.log.serialiser._ import swaydb.core.log.{Log, LogEntry} -import swaydb.core.segment.data.merge.stats.MergeStats -import swaydb.core.segment.data.merge.stats.MergeStats.{Memory, Persistent} import swaydb.core.segment._ import swaydb.core.segment.assigner.{Assignable, Assigner, Assignment, GapAggregator} import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig @@ -38,22 +39,20 @@ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.core.segment.data.merge.stats.MergeStats.{Memory, Persistent} import swaydb.core.segment.defrag.{DefragMemorySegment, DefragPersistentSegment} import swaydb.core.segment.io.{SegmentReadIO, SegmentWriteMemoryIO, SegmentWritePersistentIO} import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper import swaydb.core.util.Exceptions._ import swaydb.core.util._ -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.{LevelMeter, LevelThrottle} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.SliceIOImplicits._ -import swaydb.slice.{Slice, SliceOption} -import swaydb.config.storage.LevelStorage -import swaydb.core.segment.cache.sweeper.MemorySweeper import swaydb.effect.Effect._ import swaydb.effect.{Dir, Effect, Extension, FileLocker} +import swaydb.slice.SliceIOImplicits._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{Slice, SliceOption} import swaydb.utils.{Aggregator, Futures} import swaydb.{Bag, Error, IO} diff --git a/core/src/main/scala/swaydb/core/level/LevelCollapseResult.scala b/core/src/main/scala/swaydb/core/level/LevelCollapseResult.scala index 59e2722bf..4e0de672b 100644 --- a/core/src/main/scala/swaydb/core/level/LevelCollapseResult.scala +++ b/core/src/main/scala/swaydb/core/level/LevelCollapseResult.scala @@ -16,8 +16,8 @@ package swaydb.core.level -import swaydb.core.util.DefIO import swaydb.core.segment.{Segment, SegmentOption} +import swaydb.core.util.DefIO sealed trait LevelCollapseResult diff --git a/core/src/main/scala/swaydb/core/level/LevelRef.scala b/core/src/main/scala/swaydb/core/level/LevelRef.scala index 62268a849..88cb5d16d 100644 --- a/core/src/main/scala/swaydb/core/level/LevelRef.scala +++ b/core/src/main/scala/swaydb/core/level/LevelRef.scala @@ -16,12 +16,12 @@ package swaydb.core.level -import swaydb.core.segment.data.KeyValue +import swaydb.config.compaction.LevelMeter +import swaydb.config.{ForceSave, MMAP} import swaydb.core.level.zero.LevelZero +import swaydb.core.segment.data.KeyValue import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.segment.{Segment, SegmentOption} -import swaydb.config.compaction.LevelMeter -import swaydb.config.{ForceSave, MMAP} import swaydb.slice.{Slice, SliceOption} import swaydb.{Bag, IO} diff --git a/core/src/main/scala/swaydb/core/level/NextLevel.scala b/core/src/main/scala/swaydb/core/level/NextLevel.scala index 9b33a20e1..54e02179f 100644 --- a/core/src/main/scala/swaydb/core/level/NextLevel.scala +++ b/core/src/main/scala/swaydb/core/level/NextLevel.scala @@ -19,11 +19,11 @@ package swaydb.core.level import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.config.compaction.{LevelMeter, LevelThrottle} import swaydb.core.compaction.io.CompactionIO -import swaydb.core.segment.data.Memory import swaydb.core.level.zero.LevelZero.LevelZeroLog -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.{Assignable, Assignment} import swaydb.core.segment.block.segment.transient.TransientSegment +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.{Segment, SegmentOption} import swaydb.core.util.DefIO import swaydb.effect.Dir diff --git a/core/src/main/scala/swaydb/core/level/seek/CurrentWalker.scala b/core/src/main/scala/swaydb/core/level/seek/CurrentWalker.scala index 65ee233e7..6dd2ab952 100644 --- a/core/src/main/scala/swaydb/core/level/seek/CurrentWalker.scala +++ b/core/src/main/scala/swaydb/core/level/seek/CurrentWalker.scala @@ -16,8 +16,8 @@ package swaydb.core.level.seek -import swaydb.core.segment.data.KeyValue import swaydb.core.level.LevelSeek +import swaydb.core.segment.data.KeyValue import swaydb.core.segment.ref.search.ThreadReadState import swaydb.slice.Slice diff --git a/core/src/main/scala/swaydb/core/level/seek/Get.scala b/core/src/main/scala/swaydb/core/level/seek/Get.scala index f5e3abacb..e64c3c841 100644 --- a/core/src/main/scala/swaydb/core/level/seek/Get.scala +++ b/core/src/main/scala/swaydb/core/level/seek/Get.scala @@ -16,12 +16,12 @@ package swaydb.core.level.seek -import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.segment.FunctionStore import swaydb.core.segment.data.merge.{FunctionMerger, PendingApplyMerger, RemoveMerger, UpdateMerger} +import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/level/seek/Higher.scala b/core/src/main/scala/swaydb/core/level/seek/Higher.scala index 94fefa54d..2d113bc49 100644 --- a/core/src/main/scala/swaydb/core/level/seek/Higher.scala +++ b/core/src/main/scala/swaydb/core/level/seek/Higher.scala @@ -16,14 +16,14 @@ package swaydb.core.level.seek -import swaydb.core.segment.data.Value.FromValueOption -import swaydb.core.segment.data.{KeyValue, Memory, Value} -import swaydb.core.segment.FunctionStore import swaydb.core.level.LevelSeek +import swaydb.core.segment.FunctionStore +import swaydb.core.segment.data.Value.FromValueOption import swaydb.core.segment.data.merge._ +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/level/seek/Lower.scala b/core/src/main/scala/swaydb/core/level/seek/Lower.scala index 210d44427..07c12bd37 100644 --- a/core/src/main/scala/swaydb/core/level/seek/Lower.scala +++ b/core/src/main/scala/swaydb/core/level/seek/Lower.scala @@ -16,14 +16,14 @@ package swaydb.core.level.seek -import swaydb.core.segment.data.Value.FromValueOption -import swaydb.core.segment.data.{KeyValue, Memory, Value} -import swaydb.core.segment.FunctionStore import swaydb.core.level.LevelSeek +import swaydb.core.segment.FunctionStore +import swaydb.core.segment.data.Value.FromValueOption import swaydb.core.segment.data.merge._ +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/level/zero/LevelZero.scala b/core/src/main/scala/swaydb/core/level/zero/LevelZero.scala index afd96ac08..04119b82e 100644 --- a/core/src/main/scala/swaydb/core/level/zero/LevelZero.scala +++ b/core/src/main/scala/swaydb/core/level/zero/LevelZero.scala @@ -24,11 +24,9 @@ import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{LevelMeter, LevelZeroThrottle} import swaydb.config.storage.Level0Storage import swaydb.config.{Atomic, MMAP, OptimiseWrites} -import swaydb.core.segment.data.KeyValue.{Put, PutOption} -import swaydb.core.segment.data.Value.FromValue -import swaydb.core.segment.data._ -import swaydb.core.segment.FunctionStore import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.seek._ import swaydb.core.level.zero.LevelZero.LevelZeroLog import swaydb.core.level.{LevelRef, LevelSeek, NextLevel} @@ -36,15 +34,16 @@ import swaydb.core.log.applied.{AppliedFunctionsLog, AppliedFunctionsLogCache} import swaydb.core.log.serialiser.AppliedFunctionsLogEntryWriter import swaydb.core.log.timer.Timer import swaydb.core.log.{Log, LogEntry, Logs} +import swaydb.core.segment.data.KeyValue.{Put, PutOption} +import swaydb.core.segment.data.Value.FromValue +import swaydb.core.segment.data._ import swaydb.core.segment.entry.reader.PersistentReader import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.segment.{Segment, SegmentOption} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.segment.{FunctionStore, Segment, SegmentOption} +import swaydb.core.skiplist.SkipList import swaydb.core.util.MinMax import swaydb.core.{CoreState, MemoryPathGenerator} import swaydb.effect.{Effect, FileLocker} -import swaydb.core.skiplist.SkipList import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.{Slice, SliceOption} import swaydb.utils.{DropIterator, Options} diff --git a/core/src/main/scala/swaydb/core/level/zero/LevelZeroLogCache.scala b/core/src/main/scala/swaydb/core/level/zero/LevelZeroLogCache.scala index 89cb4388a..f38dbb82a 100644 --- a/core/src/main/scala/swaydb/core/level/zero/LevelZeroLogCache.scala +++ b/core/src/main/scala/swaydb/core/level/zero/LevelZeroLogCache.scala @@ -17,10 +17,10 @@ package swaydb.core.level.zero import swaydb.Bag -import swaydb.core.segment.data.{Memory, MemoryOption} -import swaydb.core.segment.FunctionStore -import swaydb.core.log.{LogCache, LogCacheBuilder, LogEntry} import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.core.log.{LogCache, LogCacheBuilder, LogEntry} +import swaydb.core.segment.FunctionStore +import swaydb.core.segment.data.{Memory, MemoryOption} import swaydb.core.skiplist.{SkipList, SkipListConcurrent, SkipListSeries} import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.{MaxKey, MaxKeyOption, Slice, SliceOption} diff --git a/core/src/main/scala/swaydb/core/level/zero/LevelZeroMerger.scala b/core/src/main/scala/swaydb/core/level/zero/LevelZeroMerger.scala index 952d1e849..6425ac533 100644 --- a/core/src/main/scala/swaydb/core/level/zero/LevelZeroMerger.scala +++ b/core/src/main/scala/swaydb/core/level/zero/LevelZeroMerger.scala @@ -16,14 +16,14 @@ package swaydb.core.level.zero -import swaydb.utils.Aggregator -import swaydb.core.segment.data.Memory -import swaydb.core.segment.FunctionStore import swaydb.core.level.zero.LevelZeroLogCache.State +import swaydb.core.segment.FunctionStore +import swaydb.core.segment.data.Memory import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.data.merge.{FixedMerger, KeyValueMerger} -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.utils.Aggregator import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/log/Log.scala b/core/src/main/scala/swaydb/core/log/Log.scala index dd12c4578..1ca8d4d52 100644 --- a/core/src/main/scala/swaydb/core/log/Log.scala +++ b/core/src/main/scala/swaydb/core/log/Log.scala @@ -18,12 +18,12 @@ package swaydb.core.log import com.typesafe.scalalogging.LazyLogging import swaydb.IO +import swaydb.config.MMAP import swaydb.core.file.ForceSaveApplier -import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} import swaydb.core.util.IDGenerator -import swaydb.config.MMAP import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ @@ -59,11 +59,11 @@ private[core] object Log extends LazyLogging { mmap: MMAP.Log, flushOnOverflow: Boolean, fileSize: Int)(implicit keyOrder: KeyOrder[K], - fileSweeper: FileSweeper, - bufferCleaner: ByteBufferSweeperActor, - writer: LogEntryWriter[LogEntry.Put[K, V]], - cacheBuilder: LogCacheBuilder[C], - forceSaveApplier: ForceSaveApplier): PersistentLog[K, V, C] = + fileSweeper: FileSweeper, + bufferCleaner: ByteBufferSweeperActor, + writer: LogEntryWriter[LogEntry.Put[K, V]], + cacheBuilder: LogCacheBuilder[C], + forceSaveApplier: ForceSaveApplier): PersistentLog[K, V, C] = PersistentLog( folder = folder, mmap = mmap, diff --git a/core/src/main/scala/swaydb/core/log/LogEntry.scala b/core/src/main/scala/swaydb/core/log/LogEntry.scala index 74f7af5a3..0480e93f7 100644 --- a/core/src/main/scala/swaydb/core/log/LogEntry.scala +++ b/core/src/main/scala/swaydb/core/log/LogEntry.scala @@ -16,10 +16,10 @@ package swaydb.core.log -import swaydb.core.segment.data.Memory import swaydb.core.log.LogEntry.{Put, Remove} import swaydb.core.log.serialiser.{LogEntrySerialiser, LogEntryWriter} import swaydb.core.segment.Segment +import swaydb.core.segment.data.Memory import swaydb.core.skiplist.{SkipList, SkipListBatchable, SkipListConcurrent} import swaydb.slice.order.KeyOrder import swaydb.slice.{Slice, SliceMut} diff --git a/core/src/main/scala/swaydb/core/log/Logs.scala b/core/src/main/scala/swaydb/core/log/Logs.scala index f8c6d592b..50cb3eab0 100644 --- a/core/src/main/scala/swaydb/core/log/Logs.scala +++ b/core/src/main/scala/swaydb/core/log/Logs.scala @@ -18,20 +18,19 @@ package swaydb.core.log import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Log.ExceptionHandler -import swaydb.core.log.BrakePedal +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} +import swaydb.config.{MMAP, RecoveryMode} import swaydb.core.file.ForceSaveApplier -import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} -import swaydb.core.log.timer.Timer import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.FileSweeper -import swaydb.utils.DropIterator +import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} +import swaydb.core.log.timer.Timer import swaydb.core.queue.VolatileQueue -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.{MMAP, RecoveryMode} -import swaydb.slice.order.KeyOrder -import swaydb.slice.SliceIOImplicits._ import swaydb.effect.Effect import swaydb.effect.Effect._ +import swaydb.slice.SliceIOImplicits._ +import swaydb.slice.order.KeyOrder +import swaydb.utils.DropIterator import swaydb.{Error, IO} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/log/PersistentLog.scala b/core/src/main/scala/swaydb/core/log/PersistentLog.scala index ef2d9a27b..2dc40458e 100644 --- a/core/src/main/scala/swaydb/core/log/PersistentLog.scala +++ b/core/src/main/scala/swaydb/core/log/PersistentLog.scala @@ -19,16 +19,16 @@ package swaydb.core.log import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Log.ExceptionHandler import swaydb.IO -import swaydb.core.file.{DBFile, ForceSaveApplier} -import swaydb.core.log.serialiser.{LogEntryReader, LogEntrySerialiser, LogEntryWriter} +import swaydb.config.MMAP import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.slice.SliceIOImplicits._ +import swaydb.core.file.{DBFile, ForceSaveApplier} +import swaydb.core.log.serialiser.{LogEntryReader, LogEntrySerialiser, LogEntryWriter} import swaydb.effect.Effect._ import swaydb.effect.{Effect, Extension, IOStrategy} +import swaydb.slice.Slice +import swaydb.slice.SliceIOImplicits._ +import swaydb.slice.order.KeyOrder import java.nio.file.Path import scala.annotation.tailrec @@ -79,11 +79,11 @@ private[log] object PersistentLog extends LazyLogging { mmap: MMAP.Log, flushOnOverflow: Boolean, fileSize: Int)(implicit keyOrder: KeyOrder[K], - fileSweeper: FileSweeper, - bufferCleaner: ByteBufferSweeperActor, - cacheBuilder: LogCacheBuilder[C], - writer: LogEntryWriter[LogEntry.Put[K, V]], - forceSaveApplier: ForceSaveApplier): PersistentLog[K, V, C] = { + fileSweeper: FileSweeper, + bufferCleaner: ByteBufferSweeperActor, + cacheBuilder: LogCacheBuilder[C], + writer: LogEntryWriter[LogEntry.Put[K, V]], + forceSaveApplier: ForceSaveApplier): PersistentLog[K, V, C] = { Effect.createDirectoryIfAbsent(folder) val file = @@ -106,8 +106,8 @@ private[log] object PersistentLog extends LazyLogging { private[log] def firstFile(folder: Path, memoryMapped: MMAP.Log, fileSize: Int)(implicit fileSweeper: FileSweeper, - bufferCleaner: ByteBufferSweeperActor, - forceSaveApplier: ForceSaveApplier): DBFile = + bufferCleaner: ByteBufferSweeperActor, + forceSaveApplier: ForceSaveApplier): DBFile = memoryMapped match { case MMAP.On(deleteAfterClean, forceSave) => DBFile.mmapInit( diff --git a/core/src/main/scala/swaydb/core/log/applied/AppliedFunctionsLog.scala b/core/src/main/scala/swaydb/core/log/applied/AppliedFunctionsLog.scala index a8d055253..8ae240350 100644 --- a/core/src/main/scala/swaydb/core/log/applied/AppliedFunctionsLog.scala +++ b/core/src/main/scala/swaydb/core/log/applied/AppliedFunctionsLog.scala @@ -17,17 +17,17 @@ package swaydb.core.log.applied import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.FunctionStore +import swaydb.config.MMAP import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.log import swaydb.core.log.serialiser.{AppliedFunctionsLogEntryReader, AppliedFunctionsLogEntryWriter} import swaydb.core.log.{Log, RecoveryResult} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.segment.FunctionStore import swaydb.effect.Effect +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.{Error, IO} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/log/counter/CounterLog.scala b/core/src/main/scala/swaydb/core/log/counter/CounterLog.scala index 36c1c6bd9..45f6eaa27 100644 --- a/core/src/main/scala/swaydb/core/log/counter/CounterLog.scala +++ b/core/src/main/scala/swaydb/core/log/counter/CounterLog.scala @@ -17,11 +17,11 @@ package swaydb.core.log.counter import swaydb.IO +import swaydb.config.MMAP import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.log.LogEntry import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.config.MMAP import swaydb.slice.Slice import java.nio.file.Path @@ -44,9 +44,9 @@ private[swaydb] object CounterLog { mmap: MMAP.Log, mod: Long, fileSize: Int)(implicit bufferCleaner: ByteBufferSweeperActor, - forceSaveApplier: ForceSaveApplier, - writer: LogEntryWriter[LogEntry.Put[Slice[Byte], Slice[Byte]]], - reader: LogEntryReader[LogEntry[Slice[Byte], Slice[Byte]]]): IO[swaydb.Error.Log, PersistentCounterLog] = + forceSaveApplier: ForceSaveApplier, + writer: LogEntryWriter[LogEntry.Put[Slice[Byte], Slice[Byte]]], + reader: LogEntryReader[LogEntry[Slice[Byte], Slice[Byte]]]): IO[swaydb.Error.Log, PersistentCounterLog] = PersistentCounterLog( path = dir, mmap = mmap, diff --git a/core/src/main/scala/swaydb/core/log/counter/PersistentCounterLog.scala b/core/src/main/scala/swaydb/core/log/counter/PersistentCounterLog.scala index ba2d9a697..bb5bb782c 100644 --- a/core/src/main/scala/swaydb/core/log/counter/PersistentCounterLog.scala +++ b/core/src/main/scala/swaydb/core/log/counter/PersistentCounterLog.scala @@ -19,14 +19,14 @@ package swaydb.core.log.counter import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Log.ExceptionHandler import swaydb.IO +import swaydb.config.MMAP import swaydb.core.file.ForceSaveApplier -import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} -import swaydb.core.log.{Log, LogEntry, PersistentLog} import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.FileSweeper -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder +import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} +import swaydb.core.log.{Log, LogEntry, PersistentLog} import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import java.nio.file.Path @@ -49,9 +49,9 @@ private[core] case object PersistentCounterLog extends LazyLogging { mmap: MMAP.Log, mod: Long, fileSize: Int)(implicit bufferCleaner: ByteBufferSweeperActor, - forceSaveApplier: ForceSaveApplier, - writer: LogEntryWriter[LogEntry.Put[Slice[Byte], Slice[Byte]]], - reader: LogEntryReader[LogEntry[Slice[Byte], Slice[Byte]]]): IO[swaydb.Error.Log, PersistentCounterLog] = { + forceSaveApplier: ForceSaveApplier, + writer: LogEntryWriter[LogEntry.Put[Slice[Byte], Slice[Byte]]], + reader: LogEntryReader[LogEntry[Slice[Byte], Slice[Byte]]]): IO[swaydb.Error.Log, PersistentCounterLog] = { //Disabled because autoClose is not required here. implicit val fileSweeper: FileSweeper = FileSweeper.Off implicit val keyOrder: KeyOrder[Slice[Byte]] = KeyOrder.default diff --git a/core/src/main/scala/swaydb/core/log/serialiser/AppendixLogEntryReader.scala b/core/src/main/scala/swaydb/core/log/serialiser/AppendixLogEntryReader.scala index 9f4301128..92b16b83b 100644 --- a/core/src/main/scala/swaydb/core/log/serialiser/AppendixLogEntryReader.scala +++ b/core/src/main/scala/swaydb/core/log/serialiser/AppendixLogEntryReader.scala @@ -16,15 +16,14 @@ package swaydb.core.log.serialiser -import swaydb.core.segment.FunctionStore +import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.file.ForceSaveApplier -import swaydb.core.log.LogEntry -import swaydb.core.segment.io.SegmentReadIO -import swaydb.core.segment.{Segment, SegmentSerialiser} import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.log.LogEntry import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.config.{MMAP, SegmentRefCacheLife} +import swaydb.core.segment.io.SegmentReadIO +import swaydb.core.segment.{FunctionStore, Segment, SegmentSerialiser} import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.{ReaderBase, Slice} diff --git a/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryReader.scala b/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryReader.scala index cb18e8139..c9cd7fd0e 100644 --- a/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryReader.scala +++ b/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryReader.scala @@ -16,8 +16,8 @@ package swaydb.core.log.serialiser -import swaydb.core.segment.data.{Memory, Time, Value} import swaydb.core.log.LogEntry +import swaydb.core.segment.data.{Memory, Time, Value} import swaydb.slice.{ReaderBase, Slice} import java.util.concurrent.TimeUnit diff --git a/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryWriter.scala b/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryWriter.scala index 86da14cd6..82001a4ec 100644 --- a/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryWriter.scala +++ b/core/src/main/scala/swaydb/core/log/serialiser/LevelZeroLogEntryWriter.scala @@ -16,8 +16,8 @@ package swaydb.core.log.serialiser -import swaydb.core.segment.data.Memory import swaydb.core.log.LogEntry +import swaydb.core.segment.data.Memory import swaydb.core.util.Bytes import swaydb.slice.{Slice, SliceMut} import swaydb.utils.ByteSizeOf diff --git a/core/src/main/scala/swaydb/core/log/serialiser/RangeValueSerialiser.scala b/core/src/main/scala/swaydb/core/log/serialiser/RangeValueSerialiser.scala index a29f2302c..eac3293cf 100644 --- a/core/src/main/scala/swaydb/core/log/serialiser/RangeValueSerialiser.scala +++ b/core/src/main/scala/swaydb/core/log/serialiser/RangeValueSerialiser.scala @@ -16,9 +16,9 @@ package swaydb.core.log.serialiser +import swaydb.core.file.reader.Reader import swaydb.core.segment.data.Value import swaydb.core.segment.data.Value.{Put, Remove, Update} -import swaydb.core.file.reader.Reader import swaydb.core.util.Bytes import swaydb.slice.{ReaderBase, Slice, SliceMut} diff --git a/core/src/main/scala/swaydb/core/log/serialiser/ValueSerialiser.scala b/core/src/main/scala/swaydb/core/log/serialiser/ValueSerialiser.scala index 35cb213da..2932cc5ac 100644 --- a/core/src/main/scala/swaydb/core/log/serialiser/ValueSerialiser.scala +++ b/core/src/main/scala/swaydb/core/log/serialiser/ValueSerialiser.scala @@ -16,8 +16,8 @@ package swaydb.core.log.serialiser -import swaydb.core.segment.data.{Time, Value} import swaydb.core.file.reader.Reader +import swaydb.core.segment.data.{Time, Value} import swaydb.core.util.Times._ import swaydb.core.util.{Bytes, MinMax} import swaydb.slice.{ReaderBase, Slice, SliceMut, SliceOption} diff --git a/core/src/main/scala/swaydb/core/log/timer/Timer.scala b/core/src/main/scala/swaydb/core/log/timer/Timer.scala index 51e7a5a26..9133e849a 100644 --- a/core/src/main/scala/swaydb/core/log/timer/Timer.scala +++ b/core/src/main/scala/swaydb/core/log/timer/Timer.scala @@ -17,15 +17,15 @@ package swaydb.core.log.timer import swaydb.IO -import swaydb.core.segment.data.Time +import swaydb.config.MMAP import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.log.LogEntry import swaydb.core.log.counter.{CounterLog, PersistentCounterLog} import swaydb.core.log.serialiser.{CounterLogEntryReader, CounterLogEntryWriter, LogEntryReader, LogEntryWriter} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.config.MMAP -import swaydb.slice.Slice +import swaydb.core.segment.data.Time import swaydb.effect.Effect +import swaydb.slice.Slice import swaydb.utils.StorageUnits._ import java.nio.file.Path @@ -77,7 +77,7 @@ private[core] object Timer { mmap: MMAP.Log, mod: Long = 100000, fileSize: Int = 1.mb)(implicit bufferCleaner: ByteBufferSweeperActor, - forceSaveApplier: ForceSaveApplier): IO[swaydb.Error.Log, PersistentTimer] = { + forceSaveApplier: ForceSaveApplier): IO[swaydb.Error.Log, PersistentTimer] = { implicit val writer: LogEntryWriter[LogEntry.Put[Slice[Byte], Slice[Byte]]] = CounterLogEntryWriter.CounterPutLogEntryWriter implicit val reader: LogEntryReader[LogEntry[Slice[Byte], Slice[Byte]]] = CounterLogEntryReader.CounterPutLogEntryReader diff --git a/core/src/main/scala/swaydb/core/segment/DeadlineAndFunctionId.scala b/core/src/main/scala/swaydb/core/segment/DeadlineAndFunctionId.scala index 44bb139e5..32f5bc337 100644 --- a/core/src/main/scala/swaydb/core/segment/DeadlineAndFunctionId.scala +++ b/core/src/main/scala/swaydb/core/segment/DeadlineAndFunctionId.scala @@ -16,8 +16,8 @@ package swaydb.core.segment -import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.segment.Segment.getNearestPutDeadline +import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.util.MinMax import swaydb.slice.Slice import swaydb.utils.FiniteDurations diff --git a/core/src/main/scala/swaydb/core/segment/FunctionStore.scala b/core/src/main/scala/swaydb/core/segment/FunctionStore.scala index f36c8c415..b8b986d26 100644 --- a/core/src/main/scala/swaydb/core/segment/FunctionStore.scala +++ b/core/src/main/scala/swaydb/core/segment/FunctionStore.scala @@ -18,8 +18,8 @@ package swaydb.core.segment import swaydb.OK import swaydb.core.segment.data.{SwayFunction, Value} -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import java.util.concurrent.ConcurrentHashMap import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/segment/MemorySegment.scala b/core/src/main/scala/swaydb/core/segment/MemorySegment.scala index b49c9b19c..e9f0645fc 100644 --- a/core/src/main/scala/swaydb/core/segment/MemorySegment.scala +++ b/core/src/main/scala/swaydb/core/segment/MemorySegment.scala @@ -17,21 +17,19 @@ package swaydb.core.segment import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data._ -import swaydb.core.segment.FunctionStore +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.defrag.DefragMemorySegment import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.FileSweeper -import swaydb.core.util._ import swaydb.core.skiplist.SkipListTreeMap -import swaydb.slice.MaxKey -import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.core.util._ import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{Slice, SliceOption} +import swaydb.slice.{MaxKey, Slice, SliceOption} import java.nio.file.Path import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/PersistentSegment.scala b/core/src/main/scala/swaydb/core/segment/PersistentSegment.scala index d1e953899..e5f316a1f 100644 --- a/core/src/main/scala/swaydb/core/segment/PersistentSegment.scala +++ b/core/src/main/scala/swaydb/core/segment/PersistentSegment.scala @@ -19,10 +19,8 @@ package swaydb.core.segment import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.compaction.io.CompactionIO -import swaydb.core.segment.data.Memory import swaydb.core.file.DBFile import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig @@ -31,6 +29,8 @@ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.util.{DefIO, IDGenerator} import swaydb.slice.Slice diff --git a/core/src/main/scala/swaydb/core/segment/PersistentSegmentMany.scala b/core/src/main/scala/swaydb/core/segment/PersistentSegmentMany.scala index 3dc3c9775..dc2b3e737 100644 --- a/core/src/main/scala/swaydb/core/segment/PersistentSegmentMany.scala +++ b/core/src/main/scala/swaydb/core/segment/PersistentSegmentMany.scala @@ -19,16 +19,16 @@ package swaydb.core.segment import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Segment.ExceptionHandler import swaydb.IO +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.cache.{Cache, CacheNoIO} -import swaydb.core.segment.data._ -import swaydb.core.segment.FunctionStore -import swaydb.core.file.{DBFile, ForceSaveApplier} +import swaydb.core.compaction.io.CompactionIO import swaydb.core.file.reader.Reader +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.file.{DBFile, ForceSaveApplier} import swaydb.core.level.PathsDistributor -import swaydb.core.compaction.io.CompactionIO -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.Assignable -import swaydb.core.segment.block.{BlockCache, BlockCacheState} import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.HashIndexBlockConfig @@ -37,21 +37,19 @@ import swaydb.core.segment.block.segment.transient.{TransientSegment, TransientS import swaydb.core.segment.block.segment.{SegmentBlockConfig, SegmentBlockOffset} import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.block.{BlockCache, BlockCacheState} +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.defrag.DefragPersistentSegment import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.segment.ref.{SegmentRef, SegmentRefOption, SegmentRefReader} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper -import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.core.util._ import swaydb.core.skiplist.SkipListTreeMap -import swaydb.slice.MaxKey -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.{MMAP, SegmentRefCacheLife} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{Slice, SliceOption} +import swaydb.core.util._ import swaydb.effect.{Effect, Extension} +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{MaxKey, Slice, SliceOption} import java.nio.file.Path import java.util.concurrent.ConcurrentSkipListMap @@ -629,11 +627,11 @@ protected case object PersistentSegmentMany extends LazyLogging { keyValueCount: Int, createdInLevel: Int, listSegmentBlockCache: Option[BlockCacheState])(implicit keyOrder: KeyOrder[Slice[Byte]], - timeOrder: TimeOrder[Slice[Byte]], - functionStore: FunctionStore, - keyValueMemorySweeper: Option[MemorySweeper.KeyValue], - blockCacheMemorySweeper: Option[MemorySweeper.Block], - segmentIO: SegmentReadIO): SegmentRef = { + timeOrder: TimeOrder[Slice[Byte]], + functionStore: FunctionStore, + keyValueMemorySweeper: Option[MemorySweeper.KeyValue], + blockCacheMemorySweeper: Option[MemorySweeper.Block], + segmentIO: SegmentReadIO): SegmentRef = { val fileReader = Reader(file).moveTo(1) val listSegmentSize = fileReader.readUnsignedInt() diff --git a/core/src/main/scala/swaydb/core/segment/PersistentSegmentOne.scala b/core/src/main/scala/swaydb/core/segment/PersistentSegmentOne.scala index cfe13d2dc..44e64e2cf 100644 --- a/core/src/main/scala/swaydb/core/segment/PersistentSegmentOne.scala +++ b/core/src/main/scala/swaydb/core/segment/PersistentSegmentOne.scala @@ -19,36 +19,34 @@ package swaydb.core.segment import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Segment.ExceptionHandler import swaydb.IO -import swaydb.core.segment.data._ -import swaydb.core.segment.FunctionStore +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.{MMAP, SegmentRefCacheLife} +import swaydb.core.compaction.io.CompactionIO +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.file.{DBFile, ForceSaveApplier} import swaydb.core.level.PathsDistributor -import swaydb.core.compaction.io.CompactionIO -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.Assignable -import swaydb.core.segment.block.{BlockCache, BlockCacheState} import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockConfig, BinarySearchIndexBlockOffset} import swaydb.core.segment.block.bloomfilter.{BloomFilterBlock, BloomFilterBlockConfig, BloomFilterBlockOffset} import swaydb.core.segment.block.hashindex.{HashIndexBlock, HashIndexBlockConfig, HashIndexBlockOffset} import swaydb.core.segment.block.reader.{BlockRefReader, UnblockedReader} -import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.segment.footer.SegmentFooterBlock +import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.segment.{SegmentBlockCache, SegmentBlockConfig} import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockConfig, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockConfig, ValuesBlockOffset} +import swaydb.core.segment.block.{BlockCache, BlockCacheState} +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.defrag.DefragPersistentSegment import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.SegmentRef import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper -import swaydb.core.segment.cache.sweeper.MemorySweeper import swaydb.core.util._ -import swaydb.slice.MaxKey -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.{MMAP, SegmentRefCacheLife} +import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import java.nio.file.{Path, Paths} import scala.collection.mutable.ListBuffer @@ -118,14 +116,14 @@ protected case object PersistentSegmentOne { bloomFilterReaderCacheable: Option[UnblockedReader[BloomFilterBlockOffset, BloomFilterBlock]], footerCacheable: Option[SegmentFooterBlock], previousBlockCache: Option[BlockCacheState])(implicit keyOrder: KeyOrder[Slice[Byte]], - timeOrder: TimeOrder[Slice[Byte]], - functionStore: FunctionStore, - keyValueMemorySweeper: Option[MemorySweeper.KeyValue], - blockCacheSweeper: Option[MemorySweeper.Block], - fileSweeper: FileSweeper, - bufferCleaner: ByteBufferSweeperActor, - forceSaveApplier: ForceSaveApplier, - segmentIO: SegmentReadIO): PersistentSegmentOne = { + timeOrder: TimeOrder[Slice[Byte]], + functionStore: FunctionStore, + keyValueMemorySweeper: Option[MemorySweeper.KeyValue], + blockCacheSweeper: Option[MemorySweeper.Block], + fileSweeper: FileSweeper, + bufferCleaner: ByteBufferSweeperActor, + forceSaveApplier: ForceSaveApplier, + segmentIO: SegmentReadIO): PersistentSegmentOne = { val fileSize = segmentSize - 1 diff --git a/core/src/main/scala/swaydb/core/segment/Segment.scala b/core/src/main/scala/swaydb/core/segment/Segment.scala index dcf7e5457..b989a0192 100644 --- a/core/src/main/scala/swaydb/core/segment/Segment.scala +++ b/core/src/main/scala/swaydb/core/segment/Segment.scala @@ -17,14 +17,13 @@ package swaydb.core.segment import com.typesafe.scalalogging.LazyLogging -import swaydb.utils.Aggregator import swaydb.Error.Segment.ExceptionHandler -import swaydb.core.segment.data._ -import swaydb.core.segment.FunctionStore +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.{MMAP, SegmentRefCacheLife} +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.{FileSweeper, FileSweeperItem} import swaydb.core.file.{DBFile, ForceSaveApplier} import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.KeyValueGrouper -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.{Assignable, Assigner} import swaydb.core.segment.block.BlockCompressionInfo import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig @@ -34,24 +33,22 @@ import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.segment.{SegmentBlock, SegmentBlockConfig} import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockConfig} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockConfig} +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.KeyValueGrouper +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.io.{SegmentReadIO, SegmentWritePersistentIO} import swaydb.core.segment.ref.SegmentRef import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.{FileSweeper, FileSweeperItem} -import swaydb.utils.Collections._ -import swaydb.core.util._ import swaydb.core.skiplist.{SkipList, SkipListTreeMap} -import swaydb.slice.MaxKey -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.{MMAP, SegmentRefCacheLife} -import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.SliceIOImplicits._ -import swaydb.slice.{Slice, SliceOption} +import swaydb.core.util._ import swaydb.effect.Effect +import swaydb.slice.SliceIOImplicits._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{MaxKey, Slice, SliceOption} +import swaydb.utils.Collections._ import swaydb.utils.Futures.FutureUnitImplicits -import swaydb.utils.{FiniteDurations, SomeOrNone} +import swaydb.utils.{Aggregator, FiniteDurations, SomeOrNone} import java.nio.file.Path import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/segment/SegmentSerialiser.scala b/core/src/main/scala/swaydb/core/segment/SegmentSerialiser.scala index 4ef36a9c7..7b94bcbed 100644 --- a/core/src/main/scala/swaydb/core/segment/SegmentSerialiser.scala +++ b/core/src/main/scala/swaydb/core/segment/SegmentSerialiser.scala @@ -16,19 +16,17 @@ package swaydb.core.segment -import swaydb.core.segment.FunctionStore +import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.file.ForceSaveApplier -import swaydb.core.log.serialiser.ValueSerialiser.MinMaxSerialiser -import swaydb.core.segment.io.SegmentReadIO import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.log.serialiser.ValueSerialiser.MinMaxSerialiser import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.io.SegmentReadIO import swaydb.core.util.Bytes -import swaydb.slice.MaxKey -import swaydb.config.{MMAP, SegmentRefCacheLife} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{ReaderBase, Slice, SliceMut} import swaydb.effect.{Effect, Extension} +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{MaxKey, ReaderBase, Slice, SliceMut} import swaydb.utils.ByteSizeOf import swaydb.utils.Options.OptionsImplicits diff --git a/core/src/main/scala/swaydb/core/segment/assigner/Assignable.scala b/core/src/main/scala/swaydb/core/segment/assigner/Assignable.scala index b0ea02c6c..60ab3e1aa 100644 --- a/core/src/main/scala/swaydb/core/segment/assigner/Assignable.scala +++ b/core/src/main/scala/swaydb/core/segment/assigner/Assignable.scala @@ -16,13 +16,11 @@ package swaydb.core.segment.assigner -import swaydb.utils.Aggregator -import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.level.zero.LevelZero.LevelZeroLog -import swaydb.core.log.Log import swaydb.core.segment.data.merge.stats.MergeStats -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.core.segment.data.{KeyValue, Memory} +import swaydb.slice.{MaxKey, Slice} +import swaydb.utils.Aggregator import scala.collection.mutable.ListBuffer @@ -31,7 +29,7 @@ import scala.collection.mutable.ListBuffer * * Current types * - [[swaydb.core.segment.Segment]] - * - [[Log[Slice[Byte], Memory, LevelZeroMapCache]] + * - [[swaydb.core.log.Log[Slice[Byte], Memory, LevelZeroMapCache]] * - [[swaydb.core.segment.data.KeyValue]] */ sealed trait Assignable { @@ -60,9 +58,9 @@ object Assignable { /** * A [[Collection]] is a collection of key-values like [[swaydb.core.segment.Segment]] - * and [[Log[Slice[Byte], Memory, LevelZeroMapCache]]. + * and [[swaydb.core.log.Log[Slice[Byte], Memory, LevelZeroMapCache]]. * - * [[Log]] can be created using [[Collection.fromMap]]. + * [[swaydb.core.log.Log]] can be created using [[Collection.fromMap]]. * * This type is needed for cases where we can assign a group of key-values to a * [[swaydb.core.segment.Segment]] without need to assign each key-value saving diff --git a/core/src/main/scala/swaydb/core/segment/assigner/Assigner.scala b/core/src/main/scala/swaydb/core/segment/assigner/Assigner.scala index e51565730..b1d8a6618 100644 --- a/core/src/main/scala/swaydb/core/segment/assigner/Assigner.scala +++ b/core/src/main/scala/swaydb/core/segment/assigner/Assigner.scala @@ -16,16 +16,14 @@ package swaydb.core.segment.assigner -import swaydb.utils.Aggregator -import swaydb.core.segment.data.{KeyValue, Memory, MemoryOption, Value} import swaydb.core.segment.assigner.AssignmentTarget._ +import swaydb.core.segment.data.{KeyValue, Memory, MemoryOption, Value} import swaydb.core.segment.ref.SegmentRef import swaydb.core.segment.{PersistentSegmentMany, Segment} -import swaydb.utils.DropIterator import swaydb.core.skiplist.SkipList -import swaydb.slice.MaxKey import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} +import swaydb.slice.{MaxKey, Slice, SliceOption} +import swaydb.utils.{Aggregator, DropIterator} import scala.annotation.tailrec import scala.collection.compat._ diff --git a/core/src/main/scala/swaydb/core/segment/assigner/AssignmentTarget.scala b/core/src/main/scala/swaydb/core/segment/assigner/AssignmentTarget.scala index d6af43b4d..6a561d77f 100644 --- a/core/src/main/scala/swaydb/core/segment/assigner/AssignmentTarget.scala +++ b/core/src/main/scala/swaydb/core/segment/assigner/AssignmentTarget.scala @@ -18,8 +18,7 @@ package swaydb.core.segment.assigner import swaydb.core.segment.Segment import swaydb.core.segment.ref.SegmentRef -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.slice.{MaxKey, Slice} import scala.annotation.implicitNotFound diff --git a/core/src/main/scala/swaydb/core/segment/assigner/GapAggregator.scala b/core/src/main/scala/swaydb/core/segment/assigner/GapAggregator.scala index f0d99d384..176033f9e 100644 --- a/core/src/main/scala/swaydb/core/segment/assigner/GapAggregator.scala +++ b/core/src/main/scala/swaydb/core/segment/assigner/GapAggregator.scala @@ -16,9 +16,9 @@ package swaydb.core.segment.assigner -import swaydb.utils.Aggregator import swaydb.core.segment.data.Memory import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator} +import swaydb.utils.Aggregator import scala.collection.compat.IterableOnce import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/block/Block.scala b/core/src/main/scala/swaydb/core/segment/block/Block.scala index 036201597..63db09e35 100644 --- a/core/src/main/scala/swaydb/core/segment/block/Block.scala +++ b/core/src/main/scala/swaydb/core/segment/block/Block.scala @@ -22,10 +22,10 @@ import swaydb.core.file.reader.Reader import swaydb.core.segment.block.reader.{BlockRefReader, BlockedReader, UnblockedReader} import swaydb.core.segment.block.segment.transient.{TransientSegment, TransientSegmentRef} import swaydb.core.util.Bytes -import swaydb.utils.Collections._ -import swaydb.slice.{ReaderBase, Slice, SliceMut} import swaydb.effect.IOAction +import swaydb.slice.{ReaderBase, Slice, SliceMut} import swaydb.utils.ByteSizeOf +import swaydb.utils.Collections._ /** * A block is a group of compressed or uncompressed bytes. diff --git a/core/src/main/scala/swaydb/core/segment/block/BlockCache.scala b/core/src/main/scala/swaydb/core/segment/block/BlockCache.scala index a6f21a25c..bb6a663ce 100644 --- a/core/src/main/scala/swaydb/core/segment/block/BlockCache.scala +++ b/core/src/main/scala/swaydb/core/segment/block/BlockCache.scala @@ -19,9 +19,8 @@ package swaydb.core.segment.block import com.typesafe.scalalogging.LazyLogging import swaydb.core.cache.Cache import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.utils.HashedMap import swaydb.slice.{Slice, SliceOption, SliceRO, Slices} -import swaydb.utils.Options +import swaydb.utils.{HashedMap, Options} import java.util.concurrent.ConcurrentHashMap import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/segment/block/BlockCacheState.scala b/core/src/main/scala/swaydb/core/segment/block/BlockCacheState.scala index b6004ccbc..3c4d30b4f 100644 --- a/core/src/main/scala/swaydb/core/segment/block/BlockCacheState.scala +++ b/core/src/main/scala/swaydb/core/segment/block/BlockCacheState.scala @@ -2,8 +2,8 @@ package swaydb.core.segment.block import swaydb.core.cache.CacheNoIO import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.utils.HashedMap import swaydb.slice.{Slice, SliceOption} +import swaydb.utils.HashedMap class BlockCacheState(val blockSize: Int, val skipBlockCacheSeekSize: Int, diff --git a/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchEntryFormat.scala b/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchEntryFormat.scala index 5d35f71c7..599ad36df 100644 --- a/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchEntryFormat.scala +++ b/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchEntryFormat.scala @@ -16,16 +16,16 @@ package swaydb.core.segment.block.binarysearch -import swaydb.core.segment.data.Persistent.Partial -import swaydb.core.segment.data.{Memory, Persistent} +import swaydb.config.IndexFormat import swaydb.core.file.reader.Reader import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.Persistent.Partial +import swaydb.core.segment.data.{Memory, Persistent} import swaydb.core.util.Bytes -import swaydb.config.IndexFormat -import swaydb.slice.{Slice, SliceMut} import swaydb.macros.Sealed +import swaydb.slice.{Slice, SliceMut} import swaydb.utils.ByteSizeOf private[core] sealed trait BinarySearchEntryFormat { diff --git a/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock.scala b/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock.scala index a4d99b1c5..4b3ee9986 100644 --- a/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock.scala +++ b/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock.scala @@ -16,15 +16,15 @@ package swaydb.core.segment.block.binarysearch -import swaydb.core.segment.data.{Persistent, PersistentOption} +import swaydb.config.UncompressedBlockInfo import swaydb.core.segment.block._ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset, SortedIndexBlockSecondaryIndexEntry, SortedIndexBlockState} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.util.{Bytes, MinMax} -import swaydb.config.UncompressedBlockInfo -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.ByteSizeOf import swaydb.utils.Maybe.{Maybe, _} diff --git a/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlockState.scala b/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlockState.scala index 0e07a75ad..605409a5b 100644 --- a/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlockState.scala +++ b/core/src/main/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlockState.scala @@ -1,8 +1,8 @@ package swaydb.core.segment.block.binarysearch import swaydb.compression.CompressionInternal -import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlock.optimalBytesRequired import swaydb.config.UncompressedBlockInfo +import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlock.optimalBytesRequired import swaydb.slice.{Slice, SliceMut} import swaydb.utils.Maybe diff --git a/core/src/main/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlock.scala b/core/src/main/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlock.scala index 4d66a0c5a..843083b0d 100644 --- a/core/src/main/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlock.scala +++ b/core/src/main/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlock.scala @@ -18,10 +18,10 @@ package swaydb.core.segment.block.bloomfilter import com.typesafe.scalalogging.LazyLogging import swaydb.compression.CompressionInternal +import swaydb.config.UncompressedBlockInfo import swaydb.core.segment.block._ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.util.{Bytes, MurmurHash3Generic} -import swaydb.config.UncompressedBlockInfo import swaydb.slice.Slice import swaydb.utils.ByteSizeOf diff --git a/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlock.scala b/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlock.scala index 6681c7ba4..f6a3afa6f 100644 --- a/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlock.scala +++ b/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlock.scala @@ -17,15 +17,15 @@ package swaydb.core.segment.block.hashindex import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data.Persistent +import swaydb.config.{HashIndex, UncompressedBlockInfo} import swaydb.core.segment.block._ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset, SortedIndexBlockSecondaryIndexEntry, SortedIndexBlockState} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.Persistent import swaydb.core.util.{Bytes, CRC32} -import swaydb.config.{HashIndex, UncompressedBlockInfo} -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.ByteSizeOf import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlockState.scala b/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlockState.scala index 3e52023a0..e4ef9aeb5 100644 --- a/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlockState.scala +++ b/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexBlockState.scala @@ -1,8 +1,8 @@ package swaydb.core.segment.block.hashindex import swaydb.compression.CompressionInternal -import swaydb.core.util.CRC32 import swaydb.config.UncompressedBlockInfo +import swaydb.core.util.CRC32 import swaydb.slice.{Slice, SliceMut} import scala.beans.BeanProperty diff --git a/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexEntryFormat.scala b/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexEntryFormat.scala index 273d69616..b940cdda1 100644 --- a/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexEntryFormat.scala +++ b/core/src/main/scala/swaydb/core/segment/block/hashindex/HashIndexEntryFormat.scala @@ -16,16 +16,16 @@ package swaydb.core.segment.block.hashindex -import swaydb.core.segment.data.Persistent.Partial -import swaydb.core.segment.data.{Memory, Persistent} +import swaydb.config.IndexFormat import swaydb.core.file.reader.Reader import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.Persistent.Partial +import swaydb.core.segment.data.{Memory, Persistent} import swaydb.core.util.{Bytes, CRC32} -import swaydb.config.IndexFormat -import swaydb.slice.{Slice, SliceMut} import swaydb.macros.Sealed +import swaydb.slice.{Slice, SliceMut} import swaydb.utils.ByteSizeOf private[core] sealed trait HashIndexEntryFormat { diff --git a/core/src/main/scala/swaydb/core/segment/block/reader/BlockReaderBase.scala b/core/src/main/scala/swaydb/core/segment/block/reader/BlockReaderBase.scala index 95d1ee2d5..33907710e 100644 --- a/core/src/main/scala/swaydb/core/segment/block/reader/BlockReaderBase.scala +++ b/core/src/main/scala/swaydb/core/segment/block/reader/BlockReaderBase.scala @@ -18,7 +18,7 @@ package swaydb.core.segment.block.reader import com.typesafe.scalalogging.LazyLogging import swaydb.core.segment.block.{BlockCache, BlockCacheSource, BlockCacheState, BlockOffset} -import swaydb.slice.{Reader, ReaderBase, Slice, SliceOption, SliceRO} +import swaydb.slice._ /** * Defers [[ReaderBase]] related operations to [[BlockReader]]. diff --git a/core/src/main/scala/swaydb/core/segment/block/reader/BlockRefReader.scala b/core/src/main/scala/swaydb/core/segment/block/reader/BlockRefReader.scala index e2ed01570..bd2b1519d 100644 --- a/core/src/main/scala/swaydb/core/segment/block/reader/BlockRefReader.scala +++ b/core/src/main/scala/swaydb/core/segment/block/reader/BlockRefReader.scala @@ -20,8 +20,8 @@ import swaydb.core.file.DBFile import swaydb.core.file.reader.{FileReader, Reader} import swaydb.core.segment.block._ import swaydb.core.segment.block.segment.SegmentBlockOffset -import swaydb.slice.{Reader, Slice, SliceReader} import swaydb.slice.utils.ByteOps +import swaydb.slice.{Reader, Slice, SliceReader} private[core] object BlockRefReader { diff --git a/core/src/main/scala/swaydb/core/segment/block/reader/BlockedReader.scala b/core/src/main/scala/swaydb/core/segment/block/reader/BlockedReader.scala index fe32f4cab..1845973d9 100644 --- a/core/src/main/scala/swaydb/core/segment/block/reader/BlockedReader.scala +++ b/core/src/main/scala/swaydb/core/segment/block/reader/BlockedReader.scala @@ -18,9 +18,9 @@ package swaydb.core.segment.block.reader import swaydb.core.file.reader.Reader import swaydb.core.segment.block.segment.{SegmentBlock, SegmentBlockOffset} -import swaydb.core.segment.block.{Block, BlockCache, BlockCacheState, BlockOffset, BlockOps} -import swaydb.slice.{Reader, Slice} +import swaydb.core.segment.block.{Block, BlockCacheState, BlockOffset, BlockOps} import swaydb.slice.utils.ByteOps +import swaydb.slice.{Reader, Slice} private[core] object BlockedReader { diff --git a/core/src/main/scala/swaydb/core/segment/block/reader/UnblockedReader.scala b/core/src/main/scala/swaydb/core/segment/block/reader/UnblockedReader.scala index fbc1e58a8..b41778137 100644 --- a/core/src/main/scala/swaydb/core/segment/block/reader/UnblockedReader.scala +++ b/core/src/main/scala/swaydb/core/segment/block/reader/UnblockedReader.scala @@ -17,9 +17,9 @@ package swaydb.core.segment.block.reader import swaydb.core.file.reader.{FileReader, Reader} -import swaydb.core.segment.block.{Block, BlockCache, BlockCacheState, BlockOffset, BlockOps} -import swaydb.slice.{Reader, Slice, SliceReader} +import swaydb.core.segment.block.{Block, BlockCacheState, BlockOffset, BlockOps} import swaydb.slice.utils.ByteOps +import swaydb.slice.{Reader, Slice, SliceReader} /** * A typed object that indicates that block is already decompressed and now is reading data bytes. diff --git a/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlock.scala b/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlock.scala index 1abba347d..ab96c1771 100644 --- a/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlock.scala +++ b/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlock.scala @@ -17,8 +17,8 @@ package swaydb.core.segment.block.segment import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data.Memory -import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.config._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.segment.block._ import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockConfig, BinarySearchIndexBlockState} import swaydb.core.segment.block.bloomfilter.{BloomFilterBlock, BloomFilterBlockConfig} @@ -27,10 +27,10 @@ import swaydb.core.segment.block.segment.footer.{SegmentFooterBlock, SegmentFoot import swaydb.core.segment.block.segment.transient.{ClosedBlocks, TransientSegment, TransientSegmentRef} import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockConfig, SortedIndexBlockState} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockConfig, ValuesBlockState} +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.{PersistentSegmentMany, PersistentSegmentOne} import swaydb.core.util.{Bytes, MinMax} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config._ import swaydb.slice.Slice import swaydb.slice.order.KeyOrder import swaydb.utils.Futures._ diff --git a/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlockCache.scala b/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlockCache.scala index f0feb0b38..b193a4447 100644 --- a/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlockCache.scala +++ b/core/src/main/scala/swaydb/core/segment/block/segment/SegmentBlockCache.scala @@ -18,7 +18,6 @@ package swaydb.core.segment.block.segment import swaydb.Error.Segment.ExceptionHandler import swaydb.core.cache.{Cache, Lazy} -import swaydb.core.segment.data.Persistent import swaydb.core.file.DBFile import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockOffset} import swaydb.core.segment.block.bloomfilter.{BloomFilterBlock, BloomFilterBlockOffset} @@ -27,11 +26,12 @@ import swaydb.core.segment.block.reader.{BlockRefReader, BlockedReader, Unblocke import swaydb.core.segment.block.segment.footer.SegmentFooterBlock import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} -import swaydb.core.segment.block.{Block, BlockCache, BlockCacheState, BlockOffset, BlockOps} -import swaydb.core.segment.io.SegmentReadIO +import swaydb.core.segment.block.{Block, BlockCacheState, BlockOffset, BlockOps} import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.slice.Slice +import swaydb.core.segment.data.Persistent +import swaydb.core.segment.io.SegmentReadIO import swaydb.effect.{IOAction, IOStrategy, Reserve} +import swaydb.slice.Slice import swaydb.{Error, IO} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegment.scala b/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegment.scala index 4694850b2..35049cc3a 100644 --- a/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegment.scala +++ b/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegment.scala @@ -16,7 +16,6 @@ package swaydb.core.segment.block.segment.transient -import swaydb.core.segment.data.KeyValue import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockOffset} import swaydb.core.segment.block.bloomfilter.{BloomFilterBlock, BloomFilterBlockOffset} import swaydb.core.segment.block.hashindex.{HashIndexBlock, HashIndexBlockOffset} @@ -24,11 +23,11 @@ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.segment.footer.SegmentFooterBlock import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.KeyValue import swaydb.core.segment.ref.SegmentRef import swaydb.core.segment.{MemorySegment, PersistentSegment, Segment} import swaydb.core.util.MinMax -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.slice.{MaxKey, Slice} import scala.concurrent.Future import scala.concurrent.duration.Deadline diff --git a/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentRef.scala b/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentRef.scala index 2ee3262b7..a07c1158d 100644 --- a/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentRef.scala +++ b/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentRef.scala @@ -24,8 +24,7 @@ import swaydb.core.segment.block.segment.footer.SegmentFooterBlock import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset, SortedIndexBlockState} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} import swaydb.core.util.MinMax -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.slice.{MaxKey, Slice} import scala.concurrent.duration.Deadline diff --git a/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentSerialiser.scala b/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentSerialiser.scala index 64912ab10..450beb631 100644 --- a/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentSerialiser.scala +++ b/core/src/main/scala/swaydb/core/segment/block/segment/transient/TransientSegmentSerialiser.scala @@ -16,7 +16,6 @@ package swaydb.core.segment.block.segment.transient -import swaydb.core.segment.data.{Memory, Persistent, Time, Value} import swaydb.core.file.DBFile import swaydb.core.file.reader.Reader import swaydb.core.log.serialiser.ValueSerialiser.MinMaxSerialiser @@ -28,13 +27,13 @@ import swaydb.core.segment.block.reader.{BlockRefReader, UnblockedReader} import swaydb.core.segment.block.segment.footer.SegmentFooterBlock import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.{Memory, Persistent, Time, Value} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.SegmentRef -import swaydb.core.segment.cache.sweeper.MemorySweeper import swaydb.core.util.Bytes -import swaydb.slice.MaxKey +import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.utils.ByteSizeOf object TransientSegmentSerialiser { diff --git a/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlock.scala b/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlock.scala index e85686908..0d650ee49 100644 --- a/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlock.scala +++ b/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlock.scala @@ -17,19 +17,18 @@ package swaydb.core.segment.block.sortedindex import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data._ -import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.config.UncompressedBlockInfo import swaydb.core.segment.block._ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockConfig, ValuesBlockOffset} +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.entry.writer._ import swaydb.core.segment.ref.search.KeyMatcher import swaydb.core.segment.ref.search.KeyMatcher.Result import swaydb.core.util.{Bytes, MinMax} -import swaydb.slice.MaxKey -import swaydb.config.UncompressedBlockInfo import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceMut, SliceRO} +import swaydb.slice.{MaxKey, Slice, SliceMut} import swaydb.utils.{ByteSizeOf, FiniteDurations} import scala.annotation.tailrec diff --git a/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockState.scala b/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockState.scala index 896e74ed7..30a8ff180 100644 --- a/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockState.scala +++ b/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockState.scala @@ -1,12 +1,11 @@ package swaydb.core.segment.block.sortedindex import swaydb.compression.CompressionInternal +import swaydb.config.UncompressedBlockInfo import swaydb.core.segment.data.Memory import swaydb.core.segment.entry.writer.EntryWriter import swaydb.core.util.MinMax -import swaydb.slice.MaxKey -import swaydb.config.UncompressedBlockInfo -import swaydb.slice.{Slice, SliceMut} +import swaydb.slice.{MaxKey, Slice, SliceMut} import scala.collection.mutable.ListBuffer import scala.concurrent.duration.Deadline diff --git a/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexEntryParser.scala b/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexEntryParser.scala index ae0e66ae4..02f5d0ba7 100644 --- a/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexEntryParser.scala +++ b/core/src/main/scala/swaydb/core/segment/block/sortedindex/SortedIndexEntryParser.scala @@ -16,9 +16,9 @@ package swaydb.core.segment.block.sortedindex -import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.segment.entry.reader.PersistentParser import swaydb.slice.Slice diff --git a/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlock.scala b/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlock.scala index 507487f0d..4fc9a322e 100644 --- a/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlock.scala +++ b/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlock.scala @@ -17,12 +17,12 @@ package swaydb.core.segment.block.values import swaydb.IO -import swaydb.core.segment.data.Memory -import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.config.UncompressedBlockInfo import swaydb.core.segment.block._ import swaydb.core.segment.block.reader.UnblockedReader +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.entry.writer.EntryWriter -import swaydb.config.UncompressedBlockInfo import swaydb.slice.{Slice, SliceMut} private[core] case object ValuesBlock { diff --git a/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlockState.scala b/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlockState.scala index 730fb2af9..9c432023b 100644 --- a/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlockState.scala +++ b/core/src/main/scala/swaydb/core/segment/block/values/ValuesBlockState.scala @@ -1,8 +1,8 @@ package swaydb.core.segment.block.values import swaydb.compression.CompressionInternal -import swaydb.core.segment.entry.writer.EntryWriter import swaydb.config.UncompressedBlockInfo +import swaydb.core.segment.entry.writer.EntryWriter import swaydb.slice.{Slice, SliceMut} private[block] class ValuesBlockState(var compressibleBytes: SliceMut[Byte], diff --git a/core/src/main/scala/swaydb/core/segment/cache/sweeper/MemorySweeper.scala b/core/src/main/scala/swaydb/core/segment/cache/sweeper/MemorySweeper.scala index bf4190d3b..3d026d665 100644 --- a/core/src/main/scala/swaydb/core/segment/cache/sweeper/MemorySweeper.scala +++ b/core/src/main/scala/swaydb/core/segment/cache/sweeper/MemorySweeper.scala @@ -18,13 +18,12 @@ package swaydb.core.segment.cache.sweeper import com.typesafe.scalalogging.LazyLogging import swaydb.ActorConfig.QueueOrder +import swaydb.config.MemoryCache import swaydb.core.cache.CacheNoIO import swaydb.core.segment.data.Persistent -import swaydb.utils.HashedMap import swaydb.core.skiplist.SkipList -import swaydb.config.MemoryCache import swaydb.slice.{Slice, SliceOption} -import swaydb.utils.ByteSizeOf +import swaydb.utils.{ByteSizeOf, HashedMap} import swaydb.{Actor, ActorConfig, ActorRef, Glass} import java.util.concurrent.ConcurrentSkipListMap diff --git a/core/src/main/scala/swaydb/core/segment/data/KeyValue.scala b/core/src/main/scala/swaydb/core/segment/data/KeyValue.scala index 4b23982cc..237950d59 100644 --- a/core/src/main/scala/swaydb/core/segment/data/KeyValue.scala +++ b/core/src/main/scala/swaydb/core/segment/data/KeyValue.scala @@ -24,9 +24,8 @@ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} import swaydb.core.segment.ref.search.KeyMatcher import swaydb.core.util.Bytes -import swaydb.slice.MaxKey import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} +import swaydb.slice.{MaxKey, Slice, SliceOption} import swaydb.utils.{SomeOrNone, SomeOrNoneCovariant, TupleOrNone} import scala.concurrent.duration.{Deadline, FiniteDuration} diff --git a/core/src/main/scala/swaydb/core/segment/data/Time.scala b/core/src/main/scala/swaydb/core/segment/data/Time.scala index 91f80e066..d8247d01b 100644 --- a/core/src/main/scala/swaydb/core/segment/data/Time.scala +++ b/core/src/main/scala/swaydb/core/segment/data/Time.scala @@ -17,8 +17,8 @@ package swaydb.core.segment.data import swaydb.IO -import swaydb.slice.order.TimeOrder import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder import swaydb.slice.utils.ScalaByteOps import swaydb.utils.ByteSizeOf diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/ApplyMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/ApplyMerger.scala index c4abb55a7..eb74a0556 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/ApplyMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/ApplyMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object ApplyMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/FixedMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/FixedMerger.scala index f96825958..a485b3150 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/FixedMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/FixedMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object FixedMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/FunctionMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/FunctionMerger.scala index 185bbce89..7c79e3727 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/FunctionMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/FunctionMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data._ import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data._ import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object FunctionMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/KeyValueMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/KeyValueMerger.scala index 17d6baccf..8dbfc7b16 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/KeyValueMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/KeyValueMerger.scala @@ -17,13 +17,13 @@ package swaydb.core.segment.data.merge import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.FunctionStore -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.Assignable -import swaydb.utils.DropIterator -import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.utils.DropIterator import scala.annotation.tailrec import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/PendingApplyMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/PendingApplyMerger.scala index 017644f18..4518e803b 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/PendingApplyMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/PendingApplyMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data.{KeyValue, Value} import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object PendingApplyMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/PutMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/PutMerger.scala index 571ad8fbb..949ec3800 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/PutMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/PutMerger.scala @@ -17,8 +17,8 @@ package swaydb.core.segment.data.merge import swaydb.core.segment.data.{KeyValue, Value} -import swaydb.slice.order.TimeOrder import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object PutMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/RemoveMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/RemoveMerger.scala index bbe672867..ddb02c57a 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/RemoveMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/RemoveMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object RemoveMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/UpdateMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/UpdateMerger.scala index 6ac226ec8..fae8988a4 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/UpdateMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/UpdateMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data.{KeyValue, Memory, Value} import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object UpdateMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/ValueMerger.scala b/core/src/main/scala/swaydb/core/segment/data/merge/ValueMerger.scala index ce7d9e036..3cd6e5ef7 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/ValueMerger.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/ValueMerger.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.data.merge -import swaydb.core.segment.data.Value import swaydb.core.segment.FunctionStore -import swaydb.slice.order.TimeOrder +import swaydb.core.segment.data.Value import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder private[core] object ValueMerger { diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStats.scala b/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStats.scala index ce9705148..610a08c7e 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStats.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStats.scala @@ -16,11 +16,10 @@ package swaydb.core.segment.data.merge.stats -import swaydb.utils.Aggregator import swaydb.core.segment.data import swaydb.core.segment.entry.id.KeyValueId import swaydb.core.util.Bytes -import swaydb.utils.ByteSizeOf +import swaydb.utils.{Aggregator, ByteSizeOf} import scala.collection.compat.IterableOnce import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsCreator.scala b/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsCreator.scala index 9c570a35c..89ce515a6 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsCreator.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsCreator.scala @@ -16,9 +16,9 @@ package swaydb.core.segment.data.merge.stats -import swaydb.utils.Aggregator import swaydb.core.segment.data.Memory import swaydb.core.segment.data.merge.KeyValueGrouper +import swaydb.utils.Aggregator import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculator.scala b/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculator.scala index a8c4b4f74..0837f88d8 100644 --- a/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculator.scala +++ b/core/src/main/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculator.scala @@ -16,9 +16,9 @@ package swaydb.core.segment.data.merge.stats -import swaydb.core.segment.data.Memory import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig +import swaydb.core.segment.data.Memory import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/defrag/Defrag.scala b/core/src/main/scala/swaydb/core/segment/defrag/Defrag.scala index 0b06d4c30..8771da530 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/Defrag.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/Defrag.scala @@ -16,12 +16,12 @@ package swaydb.core.segment.defrag -import swaydb.core.segment.data.Memory import swaydb.core.segment.FunctionStore -import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} import swaydb.core.segment.defrag.DefragSource._ import swaydb.core.util.DefIO import swaydb.slice.Slice diff --git a/core/src/main/scala/swaydb/core/segment/defrag/DefragGap.scala b/core/src/main/scala/swaydb/core/segment/defrag/DefragGap.scala index 0a00aaa53..081841004 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/DefragGap.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/DefragGap.scala @@ -16,11 +16,11 @@ package swaydb.core.segment.defrag -import swaydb.core.segment.data.{KeyValue, Memory} -import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment +import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} +import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.segment.ref.SegmentRef import swaydb.core.segment.{MemorySegment, PersistentSegment, PersistentSegmentMany, Segment} diff --git a/core/src/main/scala/swaydb/core/segment/defrag/DefragMemorySegment.scala b/core/src/main/scala/swaydb/core/segment/defrag/DefragMemorySegment.scala index 10d0eae7b..9f27cd851 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/DefragMemorySegment.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/DefragMemorySegment.scala @@ -17,15 +17,14 @@ package swaydb.core.segment.defrag import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.core.segment.data.Memory -import swaydb.core.segment.FunctionStore +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment._ import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment -import swaydb.core.file.sweeper.FileSweeper +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.util.{DefIO, IDGenerator} import swaydb.slice.Slice import swaydb.slice.order.{KeyOrder, TimeOrder} diff --git a/core/src/main/scala/swaydb/core/segment/defrag/DefragMerge.scala b/core/src/main/scala/swaydb/core/segment/defrag/DefragMerge.scala index c4e05dd05..92d508134 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/DefragMerge.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/DefragMerge.scala @@ -16,15 +16,15 @@ package swaydb.core.segment.defrag -import swaydb.core.segment.data.Memory import swaydb.core.segment.FunctionStore -import swaydb.core.segment.data.merge.KeyValueMerger -import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator} import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.segment.transient.TransientSegment +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.KeyValueMerger +import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator} import swaydb.core.segment.defrag.DefragSource._ -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/defrag/DefragPersistentSegment.scala b/core/src/main/scala/swaydb/core/segment/defrag/DefragPersistentSegment.scala index 152f12fe7..6d314496d 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/DefragPersistentSegment.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/DefragPersistentSegment.scala @@ -19,11 +19,10 @@ package swaydb.core.segment.defrag import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.compaction.io.CompactionIO -import swaydb.core.segment.data.Memory import swaydb.core.file.ForceSaveApplier -import swaydb.core.segment.FunctionStore +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment._ import swaydb.core.segment.assigner._ import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig @@ -33,17 +32,17 @@ import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.segment.{SegmentBlock, SegmentBlockConfig} import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.defrag.DefragSource._ import swaydb.core.segment.io.{SegmentReadIO, SegmentWriteIO} import swaydb.core.segment.ref.{SegmentRef, SegmentRefOption} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper -import swaydb.core.segment.cache.sweeper.MemorySweeper import swaydb.core.util.{DefIO, IDGenerator} import swaydb.slice.Slice import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.utils.{Aggregator, Futures} import swaydb.utils.Futures.FutureUnitImplicits +import swaydb.utils.{Aggregator, Futures} import scala.collection.mutable import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/defrag/DefragSource.scala b/core/src/main/scala/swaydb/core/segment/defrag/DefragSource.scala index 41ed9349c..62a71192d 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/DefragSource.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/DefragSource.scala @@ -16,11 +16,10 @@ package swaydb.core.segment.defrag -import swaydb.core.segment.data.KeyValue import swaydb.core.segment.Segment +import swaydb.core.segment.data.KeyValue import swaydb.core.segment.ref.SegmentRef -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.slice.{MaxKey, Slice} import scala.annotation.implicitNotFound diff --git a/core/src/main/scala/swaydb/core/segment/defrag/FragmentAndAssignment.scala b/core/src/main/scala/swaydb/core/segment/defrag/FragmentAndAssignment.scala index da09a76a6..9bfd116ad 100644 --- a/core/src/main/scala/swaydb/core/segment/defrag/FragmentAndAssignment.scala +++ b/core/src/main/scala/swaydb/core/segment/defrag/FragmentAndAssignment.scala @@ -16,10 +16,10 @@ package swaydb.core.segment.defrag -import swaydb.core.segment.data.Memory -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.{Assignable, Assignment} import swaydb.core.segment.block.segment.transient.TransientSegment +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.MergeStats import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/entry/generators/IdsGenerator.scala b/core/src/main/scala/swaydb/core/segment/entry/generators/IdsGenerator.scala index 9d868232e..db585650c 100644 --- a/core/src/main/scala/swaydb/core/segment/entry/generators/IdsGenerator.scala +++ b/core/src/main/scala/swaydb/core/segment/entry/generators/IdsGenerator.scala @@ -17,8 +17,8 @@ package swaydb.core.segment.entry.generators import swaydb.core.segment.entry.id._ -import swaydb.slice.Slice import swaydb.effect.Effect +import swaydb.slice.Slice import java.nio.file.Paths import scala.collection.mutable.ListBuffer diff --git a/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentParser.scala b/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentParser.scala index 408616ac7..cf413dd95 100644 --- a/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentParser.scala +++ b/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentParser.scala @@ -16,12 +16,12 @@ package swaydb.core.segment.entry.reader -import swaydb.core.segment.data.Persistent.Partial -import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.file.reader.Reader import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.Persistent.Partial +import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.segment.entry.id.{KeyValueId, PersistentToKeyValueIdBinder} import swaydb.core.util.Bytes import swaydb.slice.Slice diff --git a/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentReader.scala b/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentReader.scala index 14a229ab8..8c743c6a2 100644 --- a/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentReader.scala +++ b/core/src/main/scala/swaydb/core/segment/entry/reader/PersistentReader.scala @@ -17,10 +17,10 @@ package swaydb.core.segment.entry.reader import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.file.reader.Reader import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.segment.entry.id.PersistentToKeyValueIdBinder import swaydb.core.segment.entry.reader.base.BaseEntryReader import swaydb.core.util.Bytes diff --git a/core/src/main/scala/swaydb/core/segment/entry/writer/EntryWriter.scala b/core/src/main/scala/swaydb/core/segment/entry/writer/EntryWriter.scala index 6a432b10c..be4573bda 100644 --- a/core/src/main/scala/swaydb/core/segment/entry/writer/EntryWriter.scala +++ b/core/src/main/scala/swaydb/core/segment/entry/writer/EntryWriter.scala @@ -19,7 +19,7 @@ package swaydb.core.segment.entry.writer import swaydb.core.segment.data.{Memory, MemoryOption} import swaydb.core.segment.entry.id.{BaseEntryIdFormatA, KeyValueId, MemoryToKeyValueIdBinder} import swaydb.core.util.Bytes -import swaydb.slice.{Slice, SliceMut} +import swaydb.slice.SliceMut import swaydb.utils.ByteSizeOf private[core] object EntryWriter { diff --git a/core/src/main/scala/swaydb/core/segment/io/SegmentWriteIO.scala b/core/src/main/scala/swaydb/core/segment/io/SegmentWriteIO.scala index dd9b7770b..e08f2719f 100644 --- a/core/src/main/scala/swaydb/core/segment/io/SegmentWriteIO.scala +++ b/core/src/main/scala/swaydb/core/segment/io/SegmentWriteIO.scala @@ -16,19 +16,17 @@ package swaydb.core.segment.io -import swaydb.core.util.DefIO -import swaydb.core.segment.FunctionStore +import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.PathsDistributor import swaydb.core.segment._ import swaydb.core.segment.block.segment.transient.TransientSegment -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper -import swaydb.core.util.IDGenerator -import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.core.util.{DefIO, IDGenerator} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.{Error, IO} /** diff --git a/core/src/main/scala/swaydb/core/segment/io/SegmentWriteMemoryIO.scala b/core/src/main/scala/swaydb/core/segment/io/SegmentWriteMemoryIO.scala index c37e082ef..c421a9086 100644 --- a/core/src/main/scala/swaydb/core/segment/io/SegmentWriteMemoryIO.scala +++ b/core/src/main/scala/swaydb/core/segment/io/SegmentWriteMemoryIO.scala @@ -17,19 +17,17 @@ package swaydb.core.segment.io import swaydb.Error.Segment.ExceptionHandler -import swaydb.core.util.DefIO -import swaydb.core.segment.FunctionStore +import swaydb.config.{MMAP, SegmentRefCacheLife} import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.level.PathsDistributor import swaydb.core.segment._ import swaydb.core.segment.block.segment.transient.TransientSegment -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.core.util.IDGenerator -import swaydb.config.{MMAP, SegmentRefCacheLife} -import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.core.util.{DefIO, IDGenerator} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.{Error, IO} diff --git a/core/src/main/scala/swaydb/core/segment/io/SegmentWritePersistentIO.scala b/core/src/main/scala/swaydb/core/segment/io/SegmentWritePersistentIO.scala index 1066caafd..6b6ed29db 100644 --- a/core/src/main/scala/swaydb/core/segment/io/SegmentWritePersistentIO.scala +++ b/core/src/main/scala/swaydb/core/segment/io/SegmentWritePersistentIO.scala @@ -18,20 +18,18 @@ package swaydb.core.segment.io import com.typesafe.scalalogging.LazyLogging import swaydb.Error.Segment.ExceptionHandler -import swaydb.core.util.DefIO -import swaydb.core.segment.FunctionStore +import swaydb.config.{ForceSave, MMAP, SegmentRefCacheLife} +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.file.sweeper.FileSweeper import swaydb.core.file.{DBFile, ForceSaveApplier} import swaydb.core.level.PathsDistributor import swaydb.core.segment._ import swaydb.core.segment.block.segment.transient.TransientSegment -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor -import swaydb.core.file.sweeper.FileSweeper import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.core.util.IDGenerator -import swaydb.config.{ForceSave, MMAP, SegmentRefCacheLife} -import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.core.util.{DefIO, IDGenerator} import swaydb.slice.Slice import swaydb.slice.SliceIOImplicits._ +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.{Error, IO} import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/segment/ref/SegmentRef.scala b/core/src/main/scala/swaydb/core/segment/ref/SegmentRef.scala index a75bc842d..625eb06e2 100644 --- a/core/src/main/scala/swaydb/core/segment/ref/SegmentRef.scala +++ b/core/src/main/scala/swaydb/core/segment/ref/SegmentRef.scala @@ -17,9 +17,8 @@ package swaydb.core.segment.ref import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data._ import swaydb.core.segment.assigner.Assignable -import swaydb.core.segment.block.{BlockCache, BlockCacheState} +import swaydb.core.segment.block.BlockCacheState import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockOffset} import swaydb.core.segment.block.bloomfilter.{BloomFilterBlock, BloomFilterBlockOffset} import swaydb.core.segment.block.hashindex.{HashIndexBlock, HashIndexBlockOffset} @@ -28,14 +27,14 @@ import swaydb.core.segment.block.segment.footer.SegmentFooterBlock import swaydb.core.segment.block.segment.{SegmentBlockCache, SegmentBlockOffset} import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data._ import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.{SegmentSearcher, ThreadReadState} -import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.core.util.MinMax import swaydb.core.skiplist.{SkipList, SkipListConcurrent, SkipListConcurrentLimit} -import swaydb.slice.MaxKey +import swaydb.core.util.MinMax import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} +import swaydb.slice.{MaxKey, Slice, SliceOption} import swaydb.utils.SomeOrNoneCovariant import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/segment/ref/SegmentRefReader.scala b/core/src/main/scala/swaydb/core/segment/ref/SegmentRefReader.scala index 59eb391fb..6f789dcd8 100644 --- a/core/src/main/scala/swaydb/core/segment/ref/SegmentRefReader.scala +++ b/core/src/main/scala/swaydb/core/segment/ref/SegmentRefReader.scala @@ -19,9 +19,8 @@ package swaydb.core.segment.ref import swaydb.core.segment.data.{KeyValue, Persistent, PersistentOption} import swaydb.core.segment.ref.search.{SegmentReadState, SegmentReadStateOption, SegmentSearcher, ThreadReadState} import swaydb.core.util.MinMax -import swaydb.slice.MaxKey +import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.utils.TupleOrNone import java.nio.file.Path diff --git a/core/src/main/scala/swaydb/core/segment/ref/search/KeyMatcher.scala b/core/src/main/scala/swaydb/core/segment/ref/search/KeyMatcher.scala index d039435c8..e4f32dcda 100644 --- a/core/src/main/scala/swaydb/core/segment/ref/search/KeyMatcher.scala +++ b/core/src/main/scala/swaydb/core/segment/ref/search/KeyMatcher.scala @@ -18,8 +18,8 @@ package swaydb.core.segment.ref.search import swaydb.core.segment.data.Persistent import swaydb.core.segment.ref.search.KeyMatcher.Result._ -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder private[core] sealed trait KeyMatcher { def key: Slice[Byte] diff --git a/core/src/main/scala/swaydb/core/segment/ref/search/SegmentSearcher.scala b/core/src/main/scala/swaydb/core/segment/ref/search/SegmentSearcher.scala index adc09e123..f859b174f 100644 --- a/core/src/main/scala/swaydb/core/segment/ref/search/SegmentSearcher.scala +++ b/core/src/main/scala/swaydb/core/segment/ref/search/SegmentSearcher.scala @@ -16,14 +16,14 @@ package swaydb.core.segment.ref.search import com.typesafe.scalalogging.LazyLogging -import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockOffset} import swaydb.core.segment.block.hashindex.{HashIndexBlock, HashIndexBlockOffset} import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} -import swaydb.slice.order.KeyOrder +import swaydb.core.segment.data.{Persistent, PersistentOption} import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder private[core] trait SegmentSearcher { diff --git a/core/src/main/scala/swaydb/core/util/KeyCompressor.scala b/core/src/main/scala/swaydb/core/util/KeyCompressor.scala index 1d29205c3..72bd94d0d 100644 --- a/core/src/main/scala/swaydb/core/util/KeyCompressor.scala +++ b/core/src/main/scala/swaydb/core/util/KeyCompressor.scala @@ -17,8 +17,7 @@ package swaydb.core.util import swaydb.core.segment.data.{Memory, MemoryOption} -import swaydb.slice.MaxKey -import swaydb.slice.Slice +import swaydb.slice.{MaxKey, Slice} private[core] object KeyCompressor { diff --git a/core/src/main/scala/swaydb/core/util/MinMax.scala b/core/src/main/scala/swaydb/core/util/MinMax.scala index c9da56f02..afeb3520b 100644 --- a/core/src/main/scala/swaydb/core/util/MinMax.scala +++ b/core/src/main/scala/swaydb/core/util/MinMax.scala @@ -16,9 +16,9 @@ package swaydb.core.util +import swaydb.core.segment.FunctionStore import swaydb.core.segment.data.Value.{FromValue, FromValueOption} import swaydb.core.segment.data.{KeyValue, Memory, Value} -import swaydb.core.segment.FunctionStore import swaydb.slice.Slice import swaydb.utils.{SomeOrNone, SomeOrNoneCovariant} diff --git a/core/src/test/scala/swaydb/core/CommonAssertions.scala b/core/src/test/scala/swaydb/core/CommonAssertions.scala index 43ec11c52..86b8e0d10 100644 --- a/core/src/test/scala/swaydb/core/CommonAssertions.scala +++ b/core/src/test/scala/swaydb/core/CommonAssertions.scala @@ -22,17 +22,16 @@ import org.scalatest.exceptions.TestFailedException import org.scalatest.matchers.should.Matchers._ import swaydb.Error.Segment.ExceptionHandler import swaydb.IOValues._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.PushStrategy +import swaydb.config.{Atomic, OptimiseWrites} import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory.PendingApply -import swaydb.core.segment.data.Value.FromValue -import swaydb.core.segment.data._ import swaydb.core.file.reader.{FileReader, Reader} +import swaydb.core.file.sweeper.ByteBufferSweeper import swaydb.core.level.zero.{LevelZero, LevelZeroLogCache} import swaydb.core.level.{Level, LevelRef, NextLevel} import swaydb.core.log.serialiser.{LogEntryWriter, RangeValueSerialiser, ValueSerialiser} import swaydb.core.log.{LogEntry, Logs} -import swaydb.core.segment.data.merge._ -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment._ import swaydb.core.segment.block._ import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig @@ -44,21 +43,22 @@ import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.segment.{SegmentBlock, SegmentBlockCache, SegmentBlockConfig, SegmentBlockOffset} import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockConfig} import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.Memory.PendingApply +import swaydb.core.segment.data.Value.FromValue +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge._ +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.KeyMatcher.Result import swaydb.core.segment.ref.search.{KeyMatcher, SegmentSearcher, ThreadReadState} -import swaydb.core.file.sweeper.ByteBufferSweeper -import swaydb.core.segment.cache.sweeper.MemorySweeper import swaydb.core.skiplist.SkipListConcurrent -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.PushStrategy -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.SliceIOImplicits._ -import swaydb.slice.{Reader, Slice, SliceOption, SliceReader} -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.{Effect, IOStrategy} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.SliceIOImplicits._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{Reader, Slice, SliceOption, SliceReader} import swaydb.testkit.RunThis._ import swaydb.utils.Aggregator import swaydb.{Bag, Error, Glass, IO} @@ -66,7 +66,6 @@ import swaydb.{Bag, Error, Glass, IO} import java.nio.file.Paths import scala.annotation.tailrec import scala.collection.mutable.ListBuffer -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import scala.reflect.ClassTag diff --git a/core/src/test/scala/swaydb/core/PrivateMethodInvokers.scala b/core/src/test/scala/swaydb/core/PrivateMethodInvokers.scala index 4761a8b82..fd1d60972 100644 --- a/core/src/test/scala/swaydb/core/PrivateMethodInvokers.scala +++ b/core/src/test/scala/swaydb/core/PrivateMethodInvokers.scala @@ -19,10 +19,10 @@ package swaydb.core import org.scalatest.PrivateMethodTester._ import swaydb.core.log.timer.Timer import swaydb.core.log.{Log, LogCache, Logs} +import swaydb.core.queue.VolatileQueue import swaydb.core.segment.PersistentSegment import swaydb.core.segment.ref.SegmentRef import swaydb.core.util.IDGenerator -import swaydb.core.queue.VolatileQueue import swaydb.slice.Slice import swaydb.utils.HashedMap diff --git a/core/src/test/scala/swaydb/core/TestBase.scala b/core/src/test/scala/swaydb/core/TestBase.scala index a99561199..87ad8b5af 100644 --- a/core/src/test/scala/swaydb/core/TestBase.scala +++ b/core/src/test/scala/swaydb/core/TestBase.scala @@ -21,38 +21,37 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} import swaydb.IOValues._ +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} +import swaydb.config.storage.{Level0Storage, LevelStorage} +import swaydb.config.{Atomic, MMAP, OptimiseWrites, RecoveryMode} import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, Time} -import swaydb.core.file.DBFile -import swaydb.core.file.reader.FileReader import swaydb.core.compaction._ import swaydb.core.compaction.io.CompactionIO import swaydb.core.compaction.throttle.ThrottleCompactorCreator +import swaydb.core.file.DBFile +import swaydb.core.file.reader.FileReader import swaydb.core.level.zero.LevelZero.LevelZeroLog import swaydb.core.level.zero.{LevelZero, LevelZeroLogCache} import swaydb.core.level.{Level, LevelRef, NextLevel, PathsDistributor} import swaydb.core.log.{Log, LogEntry} -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.HashIndexBlockConfig import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.core.segment.data.{Memory, Time} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.{PersistentSegment, Segment} import swaydb.core.util.IDGenerator -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{MMAP, RecoveryMode} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice -import swaydb.config.storage.{Level0Storage, LevelStorage} -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.{Dir, Effect} +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis.FutureImplicits import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/TestData.scala b/core/src/test/scala/swaydb/core/TestData.scala index aaacf01b5..fb8d2e2b6 100644 --- a/core/src/test/scala/swaydb/core/TestData.scala +++ b/core/src/test/scala/swaydb/core/TestData.scala @@ -23,17 +23,16 @@ import swaydb.IO.ExceptionHandler.Nothing import swaydb.IOValues._ import swaydb.compression.CompressionInternal import swaydb.compression.CompressionTestGen._ +import swaydb.config._ import swaydb.config.accelerate.Accelerator import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.config.compaction.{LevelMeter, LevelThrottle} import swaydb.config.storage.{Level0Storage, LevelStorage} -import swaydb.config._ import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.cache.Cache import swaydb.core.compaction.io.CompactionIO import swaydb.core.file.DBFile -import swaydb.core.segment.FunctionStore import swaydb.core.level.seek._ import swaydb.core.level.zero.LevelZero import swaydb.core.level.zero.LevelZero.LevelZeroLog diff --git a/core/src/test/scala/swaydb/core/TestForceSave.scala b/core/src/test/scala/swaydb/core/TestForceSave.scala index 89ffe037d..50de74506 100644 --- a/core/src/test/scala/swaydb/core/TestForceSave.scala +++ b/core/src/test/scala/swaydb/core/TestForceSave.scala @@ -37,7 +37,7 @@ object TestForceSave { /** * Enables [[ForceSave]] to be random. * - * @param 0.0 disables randomness - [[ForceSave.Off]]. + * @param 0.0 disables randomness - [[ForceSave.Off]]. * 0.5 would give 50% chance to be random and 50% to be [[ForceSave.Off]]. * 1.1 will always apply randomness. * diff --git a/core/src/test/scala/swaydb/core/TestSweeper.scala b/core/src/test/scala/swaydb/core/TestSweeper.scala index 059c73156..c38830ffa 100644 --- a/core/src/test/scala/swaydb/core/TestSweeper.scala +++ b/core/src/test/scala/swaydb/core/TestSweeper.scala @@ -17,13 +17,13 @@ package swaydb.core import swaydb.ActorConfig +import swaydb.config.MemoryCache import swaydb.configs.level.DefaultExecutionContext import swaydb.core.CommonAssertions._ -import swaydb.core.segment.block.{BlockCache, BlockCacheState} import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} +import swaydb.core.segment.block.{BlockCache, BlockCacheState} import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.config.MemoryCache import swaydb.utils.StorageUnits._ import scala.concurrent.duration._ diff --git a/core/src/test/scala/swaydb/core/TestTimer.scala b/core/src/test/scala/swaydb/core/TestTimer.scala index 24e36be71..c5705ff82 100644 --- a/core/src/test/scala/swaydb/core/TestTimer.scala +++ b/core/src/test/scala/swaydb/core/TestTimer.scala @@ -16,10 +16,10 @@ package swaydb.core -import swaydb.core.segment.data.Time import swaydb.core.log.timer.Timer -import swaydb.slice.Slice +import swaydb.core.segment.data.Time import swaydb.macros.Sealed +import swaydb.slice.Slice import java.util.concurrent.atomic.AtomicLong import scala.util.Random diff --git a/core/src/test/scala/swaydb/core/actor/ActorSpec.scala b/core/src/test/scala/swaydb/core/actor/ActorSpec.scala index 5f7d0bc82..03d913f77 100644 --- a/core/src/test/scala/swaydb/core/actor/ActorSpec.scala +++ b/core/src/test/scala/swaydb/core/actor/ActorSpec.scala @@ -27,7 +27,6 @@ import swaydb.testkit.RunThis._ import java.util.concurrent.{ConcurrentLinkedDeque, ConcurrentSkipListSet} import scala.collection.mutable.ListBuffer -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ import scala.concurrent.{Await, Future, Promise} import scala.jdk.CollectionConverters._ diff --git a/core/src/test/scala/swaydb/core/build/BuildSpec.scala b/core/src/test/scala/swaydb/core/build/BuildSpec.scala index af0004eea..eb3666b08 100644 --- a/core/src/test/scala/swaydb/core/build/BuildSpec.scala +++ b/core/src/test/scala/swaydb/core/build/BuildSpec.scala @@ -19,11 +19,11 @@ package swaydb.core.build import swaydb.Error.IO import swaydb.Exception.InvalidDirectoryType import swaydb.IOValues._ +import swaydb.config.DataType import swaydb.core.TestData._ import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.config.DataType -import swaydb.slice.Slice import swaydb.effect.{Effect, Extension} +import swaydb.slice.Slice import swaydb.utils.ByteSizeOf import java.nio.file.FileAlreadyExistsException diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelTaskAssignerSpec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelTaskAssignerSpec.scala index 2eeca4d89..6d3b5d49a 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelTaskAssignerSpec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelTaskAssignerSpec.scala @@ -19,18 +19,18 @@ package swaydb.core.compaction.task.assigner import org.scalamock.scalatest.MockFactory import org.scalatest.OptionValues._ import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.segment.Segment import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data.Memory import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Fixed_Spec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Fixed_Spec.scala index 48a2dbdbb..61367e35b 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Fixed_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Fixed_Spec.scala @@ -19,14 +19,13 @@ package swaydb.core.compaction.task.assigner import org.scalamock.scalatest.MockFactory import swaydb.EitherValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.level.zero.LevelZero.LevelZeroLog +import swaydb.core.segment.data.Memory import swaydb.core.{TestBase, TestCaseSweeper, TestTimer} -import swaydb.slice.MaxKey -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.{MaxKey, Slice} +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.jdk.CollectionConverters._ diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Range_Spec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Range_Spec.scala index daea6b043..ec17273ba 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Range_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Range_Spec.scala @@ -19,14 +19,13 @@ package swaydb.core.compaction.task.assigner import org.scalamock.scalatest.MockFactory import swaydb.EitherValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, Time, Value} import swaydb.core.level.zero.LevelZero.LevelZeroLog +import swaydb.core.segment.data.{Memory, Time, Value} import swaydb.core.{TestBase, TestCaseSweeper, TestTimer} -import swaydb.slice.MaxKey -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.{MaxKey, Slice} +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.jdk.CollectionConverters._ diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Spec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Spec.scala index 64a377c4a..160c9c9c5 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_createStacks_Spec.scala @@ -20,10 +20,10 @@ import org.scalamock.scalatest.MockFactory import swaydb.core.TestData._ import swaydb.core.level.zero.LevelZero.LevelZeroLog import swaydb.core.{TestBase, TestCaseSweeper, TestTimer} -import swaydb.slice.MaxKey -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.MaxKey +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.collection.mutable.ListBuffer diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_flatten_Spec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_flatten_Spec.scala index 84f749f26..67a8b1fc8 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_flatten_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_flatten_Spec.scala @@ -20,12 +20,12 @@ import org.scalamock.scalatest.MockFactory import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ +import swaydb.core._ import swaydb.core.segment.Segment import swaydb.core.segment.data.{merge => _} -import swaydb.core._ import swaydb.serializers.Default._ -import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{MaxKey, Slice} import swaydb.testkit.RunThis._ import scala.concurrent.duration.DurationInt diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_mergeStack_Spec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_mergeStack_Spec.scala index 72c9164a0..2a3c65837 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_mergeStack_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/LevelZeroTaskAssigner_mergeStack_Spec.scala @@ -18,17 +18,17 @@ package swaydb.core.compaction.task.assigner import org.scalamock.scalatest.MockFactory import org.scalatest.OptionValues._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.level.zero.LevelZero.LevelZeroLog import swaydb.core.segment.Segment +import swaydb.core.segment.data.Memory import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class LevelZeroTaskAssigner_mergeStack_Spec extends TestBase with MockFactory { diff --git a/core/src/test/scala/swaydb/core/compaction/task/assigner/TaskAssigner_Assign_Quick_Spec.scala b/core/src/test/scala/swaydb/core/compaction/task/assigner/TaskAssigner_Assign_Quick_Spec.scala index 6c7cb2844..b50a890cd 100644 --- a/core/src/test/scala/swaydb/core/compaction/task/assigner/TaskAssigner_Assign_Quick_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/task/assigner/TaskAssigner_Assign_Quick_Spec.scala @@ -17,20 +17,19 @@ package swaydb.core.compaction.task.assigner import org.scalamock.scalatest.MockFactory +import swaydb.config.MMAP +import swaydb.config.compaction.PushStrategy import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory -import swaydb.core.level.Level import swaydb.core.compaction.task.CompactionTask +import swaydb.core.level.Level import swaydb.core.segment.Segment +import swaydb.core.segment.data.Memory import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.utils.NonEmptyList -import swaydb.config.compaction.PushStrategy -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ -import swaydb.utils.OperatingSystem +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.{NonEmptyList, OperatingSystem} import scala.collection.SortedSet diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_collapse_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_collapse_Spec.scala index b0ce15a53..4da168da9 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_collapse_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_collapse_Spec.scala @@ -17,19 +17,19 @@ package swaydb.core.compaction.throttle.behaviour import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Memory import swaydb.core.compaction.task.CompactionTask import swaydb.core.segment.Segment import swaydb.core.segment.block.segment.SegmentBlockConfig -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.segment.data.Memory import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_2Levels_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_2Levels_Spec.scala index e4c7feaf1..81fa8491c 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_2Levels_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_2Levels_Spec.scala @@ -17,19 +17,19 @@ package swaydb.core.compaction.throttle.behaviour import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Memory -import swaydb.core.level.Level import swaydb.core.compaction.task.CompactionTask +import swaydb.core.level.Level import swaydb.core.segment.Segment -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.segment.data.Memory import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_MultiLevels_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_MultiLevels_Spec.scala index c504fc67f..7a25aba4d 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_MultiLevels_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_compactSegments_MultiLevels_Spec.scala @@ -17,18 +17,18 @@ package swaydb.core.compaction.throttle.behaviour import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Memory import swaydb.core.compaction.task.CompactionTask import swaydb.core.segment.Segment -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.segment.data.Memory import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_refresh_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_refresh_Spec.scala index 377856e0b..b373f7ce3 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_refresh_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourCompactionTask_refresh_Spec.scala @@ -17,17 +17,17 @@ package swaydb.core.compaction.throttle.behaviour import swaydb.IO +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Memory import swaydb.core.compaction.task.CompactionTask import swaydb.core.segment.Segment -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.segment.data.Memory import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ class BehaviourCompactionTask_refresh_Spec0 extends BehaviourCompactionTask_refresh_Spec diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_buildLowerLevels_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_buildLowerLevels_Spec.scala index 08997403c..79343c624 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_buildLowerLevels_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_buildLowerLevels_Spec.scala @@ -16,10 +16,10 @@ package swaydb.core.compaction.throttle.behaviour +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.level.Level import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestForceSave} -import swaydb.config.MMAP import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_multiLevel_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_multiLevel_Spec.scala index c34f0ee11..b63419656 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_multiLevel_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_multiLevel_Spec.scala @@ -17,19 +17,19 @@ package swaydb.core.compaction.throttle.behaviour import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.LevelThrottle import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.util.DefIO import swaydb.core.compaction.throttle.LevelState import swaydb.core.segment.Segment import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.util.DefIO import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestForceSave} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.LevelThrottle -import swaydb.config.MMAP -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_singleLevel_Spec.scala b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_singleLevel_Spec.scala index 25360a498..bd9c71cf5 100644 --- a/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_singleLevel_Spec.scala +++ b/core/src/test/scala/swaydb/core/compaction/throttle/behaviour/BehaviourWakeUp_compactLastLevel_singleLevel_Spec.scala @@ -17,18 +17,18 @@ package swaydb.core.compaction.throttle.behaviour import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.util.DefIO import swaydb.core.compaction.throttle.LevelState import swaydb.core.segment.Segment import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.util.DefIO import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestForceSave} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/file/ByteBufferSweeperSpec.scala b/core/src/test/scala/swaydb/core/file/ByteBufferSweeperSpec.scala index b151c207e..a785750c2 100644 --- a/core/src/test/scala/swaydb/core/file/ByteBufferSweeperSpec.scala +++ b/core/src/test/scala/swaydb/core/file/ByteBufferSweeperSpec.scala @@ -25,7 +25,6 @@ import swaydb.core.TestData._ import swaydb.core.file.sweeper.ByteBufferSweeper.{ByteBufferSweeperActor, Command} import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestForceSave} -import swaydb.slice.Slice import swaydb.effect.Effect import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/file/EffectSpec.scala b/core/src/test/scala/swaydb/core/file/EffectSpec.scala index 8d7258042..302ffcabe 100644 --- a/core/src/test/scala/swaydb/core/file/EffectSpec.scala +++ b/core/src/test/scala/swaydb/core/file/EffectSpec.scala @@ -16,13 +16,12 @@ package swaydb.core.file -import swaydb.IO +import swaydb.{Benchmark, IO} import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.slice.Slice import swaydb.effect.{Effect, Extension} +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/file/MMAPFileSpec.scala b/core/src/test/scala/swaydb/core/file/MMAPFileSpec.scala index 6cc743318..8129f21a8 100644 --- a/core/src/test/scala/swaydb/core/file/MMAPFileSpec.scala +++ b/core/src/test/scala/swaydb/core/file/MMAPFileSpec.scala @@ -22,8 +22,8 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.file.sweeper.ByteBufferCleaner import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave} -import swaydb.slice.Slice import swaydb.effect.Effect +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/file/sweeper/FileSweeperSpec.scala b/core/src/test/scala/swaydb/core/file/sweeper/FileSweeperSpec.scala index 4bd56c4d5..21c97e2e0 100644 --- a/core/src/test/scala/swaydb/core/file/sweeper/FileSweeperSpec.scala +++ b/core/src/test/scala/swaydb/core/file/sweeper/FileSweeperSpec.scala @@ -17,16 +17,15 @@ package swaydb.core.file.sweeper import org.scalamock.scalatest.MockFactory +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Memory +import swaydb.core.file.sweeper.FileSweeper._ import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data.Memory import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.FileSweeper._ -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.core.file.sweeper.{FileSweeper, FileSweeperItem} import swaydb.serializers.Default._ import swaydb.serializers._ import swaydb.testkit.RunThis._ @@ -35,7 +34,6 @@ import swaydb.{ActorConfig, _} import java.nio.file.{Path, Paths} import java.util.concurrent.ConcurrentSkipListSet import scala.collection.mutable.ListBuffer -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ class FileSweeperSpec extends TestBase with MockFactory { diff --git a/core/src/test/scala/swaydb/core/level/LevelCollpaseSpec.scala b/core/src/test/scala/swaydb/core/level/LevelCollpaseSpec.scala index 1ee23f584..5aa4f884b 100644 --- a/core/src/test/scala/swaydb/core/level/LevelCollpaseSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelCollpaseSpec.scala @@ -19,16 +19,16 @@ package swaydb.core.level import org.scalatest.OptionValues._ import swaydb.IO import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data._ import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/LevelKeyValuesSpec.scala b/core/src/test/scala/swaydb/core/level/LevelKeyValuesSpec.scala index d6c6e9fa2..4b09a667f 100644 --- a/core/src/test/scala/swaydb/core/level/LevelKeyValuesSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelKeyValuesSpec.scala @@ -20,18 +20,18 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.PrivateMethodTester import swaydb.IO import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data._ import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/LevelMapSpec.scala b/core/src/test/scala/swaydb/core/level/LevelMapSpec.scala index 2727253c6..7af8a196d 100644 --- a/core/src/test/scala/swaydb/core/level/LevelMapSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelMapSpec.scala @@ -19,21 +19,20 @@ package swaydb.core.level import org.scalamock.scalatest.MockFactory import org.scalatest.PrivateMethodTester import swaydb.IOValues._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.{Atomic, MMAP, OptimiseWrites} import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.level.zero.LevelZeroLogCache import swaydb.core.log.{Log, LogEntry} +import swaydb.core.segment.data._ import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/LevelMergeSpec.scala b/core/src/test/scala/swaydb/core/level/LevelMergeSpec.scala index 6566037bd..5e88357ef 100644 --- a/core/src/test/scala/swaydb/core/level/LevelMergeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelMergeSpec.scala @@ -19,18 +19,18 @@ package swaydb.core.level import org.scalamock.scalatest.MockFactory import org.scalatest.PrivateMethodTester import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Value.FromValue import swaydb.core.compaction.io.CompactionIO -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice +import swaydb.core.segment.data.Value.FromValue import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/level/LevelReadNoneSpec.scala b/core/src/test/scala/swaydb/core/level/LevelReadNoneSpec.scala index b2c8af1e2..933795eac 100644 --- a/core/src/test/scala/swaydb/core/level/LevelReadNoneSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelReadNoneSpec.scala @@ -17,16 +17,16 @@ package swaydb.core.level import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.data.{Memory, Value} import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestBase, TestForceSave} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/level/LevelReadSomeSpec.scala b/core/src/test/scala/swaydb/core/level/LevelReadSomeSpec.scala index 88e051a2d..ec3ba5648 100644 --- a/core/src/test/scala/swaydb/core/level/LevelReadSomeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelReadSomeSpec.scala @@ -20,14 +20,14 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.exceptions.TestFailedException import swaydb.IO import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/level/LevelReadSpec.scala b/core/src/test/scala/swaydb/core/level/LevelReadSpec.scala index 7542ebcd0..eb5de7b94 100644 --- a/core/src/test/scala/swaydb/core/level/LevelReadSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelReadSpec.scala @@ -18,6 +18,9 @@ package swaydb.core.level import org.scalamock.scalatest.MockFactory import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.LevelThrottle import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ @@ -29,14 +32,11 @@ import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.LevelThrottle -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.effect.Effect._ import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/LevelRefreshSpec.scala b/core/src/test/scala/swaydb/core/level/LevelRefreshSpec.scala index 35e0cd21d..57fee8cf5 100644 --- a/core/src/test/scala/swaydb/core/level/LevelRefreshSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelRefreshSpec.scala @@ -20,16 +20,16 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.PrivateMethodTester import swaydb.IO import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.segment.block.segment.SegmentBlockConfig -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice +import swaydb.core.segment.data._ import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/LevelRemoveSegmentSpec.scala b/core/src/test/scala/swaydb/core/level/LevelRemoveSegmentSpec.scala index 387474a35..2f8c6d2c9 100644 --- a/core/src/test/scala/swaydb/core/level/LevelRemoveSegmentSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelRemoveSegmentSpec.scala @@ -19,13 +19,13 @@ package swaydb.core.level import org.scalamock.scalatest.MockFactory import org.scalatest.PrivateMethodTester import swaydb.IO +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.TestData._ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/LevelSegmentSpec.scala b/core/src/test/scala/swaydb/core/level/LevelSegmentSpec.scala index 8926cfb04..d0339a629 100644 --- a/core/src/test/scala/swaydb/core/level/LevelSegmentSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelSegmentSpec.scala @@ -18,24 +18,24 @@ package swaydb.core.level import org.scalamock.scalatest.MockFactory import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.storage.LevelStorage import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.compaction.io.CompactionIO import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data._ import swaydb.core.util.IDGenerator -import swaydb.utils.PipeOps._ -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice -import swaydb.config.storage.LevelStorage import swaydb.effect.Effect._ import swaydb.effect.{Dir, Effect, Extension} +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem +import swaydb.utils.PipeOps._ import swaydb.utils.StorageUnits._ import swaydb.{Glass, IO} diff --git a/core/src/test/scala/swaydb/core/level/LevelSpec.scala b/core/src/test/scala/swaydb/core/level/LevelSpec.scala index b75e75852..dfbda8894 100644 --- a/core/src/test/scala/swaydb/core/level/LevelSpec.scala +++ b/core/src/test/scala/swaydb/core/level/LevelSpec.scala @@ -20,21 +20,21 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.PrivateMethodTester import swaydb.Glass import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.storage.LevelStorage import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.log.LogEntry import swaydb.core.segment.Segment import swaydb.core.segment.block.segment.SegmentBlockConfig -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice -import swaydb.config.storage.LevelStorage +import swaydb.core.segment.data._ import swaydb.effect.Effect._ import swaydb.effect.{Dir, Effect, Extension} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/level/PathsDistributorSpec.scala b/core/src/test/scala/swaydb/core/level/PathsDistributorSpec.scala index bc0f54a81..d49945903 100644 --- a/core/src/test/scala/swaydb/core/level/PathsDistributorSpec.scala +++ b/core/src/test/scala/swaydb/core/level/PathsDistributorSpec.scala @@ -21,9 +21,9 @@ import swaydb.IOValues._ import swaydb.core.TestCaseSweeper._ import swaydb.core.segment.Segment import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.slice.order.KeyOrder import swaydb.effect import swaydb.effect.{Dir, Effect} +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import java.nio.file.{Path, Paths} diff --git a/core/src/test/scala/swaydb/core/level/seek/GetNoneSpec.scala b/core/src/test/scala/swaydb/core/level/seek/GetNoneSpec.scala index 6ba646e7b..2382fb3f3 100644 --- a/core/src/test/scala/swaydb/core/level/seek/GetNoneSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/GetNoneSpec.scala @@ -25,10 +25,10 @@ import swaydb.core.TestData._ import swaydb.core.segment.data.{KeyValue, SwayFunctionOutput, Value} import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class GetNoneSpec extends AnyWordSpec with Matchers with MockFactory with OptionValues { diff --git a/core/src/test/scala/swaydb/core/level/seek/GetSomeSpec.scala b/core/src/test/scala/swaydb/core/level/seek/GetSomeSpec.scala index 917dc3af0..5cdd76bc2 100644 --- a/core/src/test/scala/swaydb/core/level/seek/GetSomeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/GetSomeSpec.scala @@ -23,14 +23,14 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{SwayFunctionOutput, Value} import swaydb.core.segment.data.merge.{FixedMerger, FunctionMerger, PendingApplyMerger} +import swaydb.core.segment.data.{SwayFunctionOutput, Value} import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class GetSomeSpec extends AnyWordSpec with Matchers with MockFactory with OptionValues { diff --git a/core/src/test/scala/swaydb/core/level/seek/HigherFixedNoneSpec.scala b/core/src/test/scala/swaydb/core/level/seek/HigherFixedNoneSpec.scala index ed531158e..c6e5c4834 100644 --- a/core/src/test/scala/swaydb/core/level/seek/HigherFixedNoneSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/HigherFixedNoneSpec.scala @@ -22,13 +22,13 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.KeyValue import swaydb.core.level.LevelSeek +import swaydb.core.segment.data.KeyValue import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class HigherFixedNoneSpec extends AnyWordSpec with Matchers with MockFactory with OptionValues { diff --git a/core/src/test/scala/swaydb/core/level/seek/HigherFixedSomeSpec.scala b/core/src/test/scala/swaydb/core/level/seek/HigherFixedSomeSpec.scala index 1971005fd..2c93740ce 100644 --- a/core/src/test/scala/swaydb/core/level/seek/HigherFixedSomeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/HigherFixedSomeSpec.scala @@ -22,14 +22,14 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.level.LevelSeek import swaydb.core.segment.data.merge.FixedMerger +import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class HigherFixedSomeSpec extends AnyWordSpec with Matchers with MockFactory with OptionValues { diff --git a/core/src/test/scala/swaydb/core/level/seek/HigherRangeNoneSpec.scala b/core/src/test/scala/swaydb/core/level/seek/HigherRangeNoneSpec.scala index 586da0f12..0d5233cb9 100644 --- a/core/src/test/scala/swaydb/core/level/seek/HigherRangeNoneSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/HigherRangeNoneSpec.scala @@ -21,13 +21,13 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.level.LevelSeek +import swaydb.core.segment.data.{KeyValue, Value} import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class HigherRangeNoneSpec extends AnyWordSpec with Matchers with MockFactory { diff --git a/core/src/test/scala/swaydb/core/level/seek/HigherRangeSomeSpec.scala b/core/src/test/scala/swaydb/core/level/seek/HigherRangeSomeSpec.scala index c91c7e9ac..283430a3e 100644 --- a/core/src/test/scala/swaydb/core/level/seek/HigherRangeSomeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/HigherRangeSomeSpec.scala @@ -23,13 +23,13 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data._ import swaydb.core.level.LevelSeek +import swaydb.core.segment.data._ import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class HigherRangeSomeSpec extends AnyWordSpec with Matchers with MockFactory { diff --git a/core/src/test/scala/swaydb/core/level/seek/HigherSpec.scala b/core/src/test/scala/swaydb/core/level/seek/HigherSpec.scala index 194129fe7..5731b9a29 100644 --- a/core/src/test/scala/swaydb/core/level/seek/HigherSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/HigherSpec.scala @@ -22,9 +22,9 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.data.Value import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class HigherSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/level/seek/LowerFixedNoneSpec.scala b/core/src/test/scala/swaydb/core/level/seek/LowerFixedNoneSpec.scala index 1c9a4d2a1..a1e31270d 100644 --- a/core/src/test/scala/swaydb/core/level/seek/LowerFixedNoneSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/LowerFixedNoneSpec.scala @@ -22,13 +22,13 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.KeyValue import swaydb.core.level.LevelSeek +import swaydb.core.segment.data.KeyValue import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class LowerFixedNoneSpec extends AnyWordSpec with Matchers with MockFactory with OptionValues { diff --git a/core/src/test/scala/swaydb/core/level/seek/LowerFixedSomeSpec.scala b/core/src/test/scala/swaydb/core/level/seek/LowerFixedSomeSpec.scala index f288780fd..fd4efb934 100644 --- a/core/src/test/scala/swaydb/core/level/seek/LowerFixedSomeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/LowerFixedSomeSpec.scala @@ -22,14 +22,14 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.level.LevelSeek import swaydb.core.segment.data.merge.FixedMerger +import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class LowerFixedSomeSpec extends AnyWordSpec with Matchers with MockFactory with OptionValues { diff --git a/core/src/test/scala/swaydb/core/level/seek/LowerRangeNoneSpec.scala b/core/src/test/scala/swaydb/core/level/seek/LowerRangeNoneSpec.scala index eaae908ed..c5cf09d99 100644 --- a/core/src/test/scala/swaydb/core/level/seek/LowerRangeNoneSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/LowerRangeNoneSpec.scala @@ -21,13 +21,13 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ -import swaydb.core.segment.data.KeyValue import swaydb.core.level.LevelSeek +import swaydb.core.segment.data.KeyValue import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class LowerRangeNoneSpec extends AnyWordSpec with Matchers with MockFactory { diff --git a/core/src/test/scala/swaydb/core/level/seek/LowerRangeSomeSpec.scala b/core/src/test/scala/swaydb/core/level/seek/LowerRangeSomeSpec.scala index 45267bc83..3d6a76d9c 100644 --- a/core/src/test/scala/swaydb/core/level/seek/LowerRangeSomeSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/LowerRangeSomeSpec.scala @@ -25,14 +25,14 @@ import swaydb.IO import swaydb.IOValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Time, Value} import swaydb.core.level.LevelSeek import swaydb.core.segment.data.merge.FixedMerger +import swaydb.core.segment.data.{Time, Value} import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class LowerRangeSomeSpec extends AnyWordSpec with Matchers with MockFactory { diff --git a/core/src/test/scala/swaydb/core/level/seek/LowerSpec.scala b/core/src/test/scala/swaydb/core/level/seek/LowerSpec.scala index a817a6caa..bc32980e5 100644 --- a/core/src/test/scala/swaydb/core/level/seek/LowerSpec.scala +++ b/core/src/test/scala/swaydb/core/level/seek/LowerSpec.scala @@ -22,9 +22,9 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.data.Value import swaydb.core.{TestData, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class LowerSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/level/zero/LevelZeroLogCacheSpec.scala b/core/src/test/scala/swaydb/core/level/zero/LevelZeroLogCacheSpec.scala index 34a102f61..b664166c0 100644 --- a/core/src/test/scala/swaydb/core/level/zero/LevelZeroLogCacheSpec.scala +++ b/core/src/test/scala/swaydb/core/level/zero/LevelZeroLogCacheSpec.scala @@ -17,20 +17,20 @@ package swaydb.core.level.zero import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import swaydb.config.{Atomic, OptimiseWrites} import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.core.segment.data.{Memory, Value} import swaydb.core.log.LogEntry import swaydb.core.log.serialiser.LevelZeroLogEntryWriter import swaydb.core.segment.data.merge.KeyValueMerger import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.core.segment.data.{Memory, Value} import swaydb.core.skiplist.{SkipListConcurrent, SkipListSeries} -import swaydb.slice.order.TimeOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder class LevelZeroLogCacheSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/level/zero/LevelZeroSpec.scala b/core/src/test/scala/swaydb/core/level/zero/LevelZeroSpec.scala index cd62b74d2..819dcabc5 100644 --- a/core/src/test/scala/swaydb/core/level/zero/LevelZeroSpec.scala +++ b/core/src/test/scala/swaydb/core/level/zero/LevelZeroSpec.scala @@ -20,23 +20,23 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.OptionValues._ import swaydb.IO import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism +import swaydb.config.compaction.LevelThrottle +import swaydb.config.storage.LevelStorage import swaydb.core.CommonAssertions._ import swaydb.core.PrivateMethodInvokers._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.log.applied.AppliedFunctionsLog import swaydb.core.log.timer.Timer +import swaydb.core.segment.data.Memory import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.compaction.LevelThrottle -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice -import swaydb.config.storage.LevelStorage import swaydb.effect.{Dir, Effect} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/log/LogEntrySpec.scala b/core/src/test/scala/swaydb/core/log/LogEntrySpec.scala index cc705d34f..934d993a8 100644 --- a/core/src/test/scala/swaydb/core/log/LogEntrySpec.scala +++ b/core/src/test/scala/swaydb/core/log/LogEntrySpec.scala @@ -17,20 +17,20 @@ package swaydb.core.log import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, MemoryOption, Value} import swaydb.core.file.reader.Reader import swaydb.core.log.serialiser._ +import swaydb.core.segment.data.{Memory, MemoryOption, Value} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.{Segment, SegmentOption} import swaydb.core.skiplist.SkipListConcurrent import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{Slice, SliceOption} import swaydb.utils.{ByteSizeOf, OperatingSystem} import scala.concurrent.duration._ diff --git a/core/src/test/scala/swaydb/core/log/LogsSpec.scala b/core/src/test/scala/swaydb/core/log/LogsSpec.scala index 5aae5b4bd..fe8e8cb1a 100644 --- a/core/src/test/scala/swaydb/core/log/LogsSpec.scala +++ b/core/src/test/scala/swaydb/core/log/LogsSpec.scala @@ -18,22 +18,21 @@ package swaydb.core.log import org.scalatest.OptionValues._ import swaydb.IOValues._ +import swaydb.config.accelerate.Accelerator +import swaydb.config.{Atomic, MMAP, OptimiseWrites, RecoveryMode} import swaydb.core.CommonAssertions._ import swaydb.core.PrivateMethodInvokers._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, MemoryOption, Value} import swaydb.core.level.zero.LevelZeroLogCache +import swaydb.core.segment.data.{Memory, MemoryOption, Value} import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.accelerate.Accelerator -import swaydb.config.{MMAP, RecoveryMode} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.Effect._ import swaydb.effect.{Effect, Extension} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/log/MapSpec.scala b/core/src/test/scala/swaydb/core/log/MapSpec.scala index fa95ae184..268197648 100644 --- a/core/src/test/scala/swaydb/core/log/MapSpec.scala +++ b/core/src/test/scala/swaydb/core/log/MapSpec.scala @@ -18,27 +18,26 @@ package swaydb.core.log import org.scalatest.OptionValues._ import swaydb.IOValues._ +import swaydb.config.{Atomic, MMAP, OptimiseWrites} import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.{Memory, MemoryOption, Value} import swaydb.core.file.DBFile import swaydb.core.level.AppendixLogCache import swaydb.core.level.zero.LevelZeroLogCache import swaydb.core.log.MapTestUtil._ import swaydb.core.log.serialiser._ import swaydb.core.segment.Segment +import swaydb.core.segment.data.{Memory, MemoryOption, Value} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.skiplist.SkipListConcurrent -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{Slice, SliceOption} -import swaydb.config.{Atomic, OptimiseWrites} import swaydb.effect.Effect._ import swaydb.effect.{Effect, Extension} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{Slice, SliceOption} import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/log/MapTestUtil.scala b/core/src/test/scala/swaydb/core/log/MapTestUtil.scala index 29125a718..1326b20ed 100644 --- a/core/src/test/scala/swaydb/core/log/MapTestUtil.scala +++ b/core/src/test/scala/swaydb/core/log/MapTestUtil.scala @@ -18,19 +18,19 @@ package swaydb.core.log import org.scalatest.matchers.should.Matchers._ import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper +import swaydb.core.file.sweeper.ByteBufferSweeper.{ByteBufferSweeperActor, State} import swaydb.core.log.counter.{CounterLog, PersistentCounterLog} import swaydb.core.log.serialiser.{LogEntryReader, LogEntryWriter} import swaydb.core.log.timer.Timer import swaydb.core.log.timer.Timer.PersistentTimer -import swaydb.core.file.sweeper.ByteBufferSweeper -import swaydb.core.file.sweeper.ByteBufferSweeper.{ByteBufferSweeperActor, State} import swaydb.core.{TestCaseSweeper, TestExecutionContext} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem import swaydb.{Bag, Glass} diff --git a/core/src/test/scala/swaydb/core/log/applied/AppliedFunctionsLogSpec.scala b/core/src/test/scala/swaydb/core/log/applied/AppliedFunctionsLogSpec.scala index 3a32f1228..7f8deaf12 100644 --- a/core/src/test/scala/swaydb/core/log/applied/AppliedFunctionsLogSpec.scala +++ b/core/src/test/scala/swaydb/core/log/applied/AppliedFunctionsLogSpec.scala @@ -17,17 +17,17 @@ package swaydb.core.log.applied import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ import swaydb.core.log.LogEntry import swaydb.core.log.MapTestUtil._ import swaydb.core.log.serialiser._ -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/log/counter/CounterLogSpec.scala b/core/src/test/scala/swaydb/core/log/counter/CounterLogSpec.scala index 9d8431213..e00195bf1 100644 --- a/core/src/test/scala/swaydb/core/log/counter/CounterLogSpec.scala +++ b/core/src/test/scala/swaydb/core/log/counter/CounterLogSpec.scala @@ -17,14 +17,14 @@ package swaydb.core.log.counter import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ +import swaydb.core._ import swaydb.core.log.MapTestUtil._ import swaydb.core.log.serialiser._ -import swaydb.core._ -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/log/serialiser/AppendixLogEntrySpec.scala b/core/src/test/scala/swaydb/core/log/serialiser/AppendixLogEntrySpec.scala index 9bba9b049..28405cced 100644 --- a/core/src/test/scala/swaydb/core/log/serialiser/AppendixLogEntrySpec.scala +++ b/core/src/test/scala/swaydb/core/log/serialiser/AppendixLogEntrySpec.scala @@ -18,6 +18,7 @@ package swaydb.core.log.serialiser import org.scalatest.OptionValues._ import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.file.reader.Reader @@ -26,11 +27,10 @@ import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.{Segment, SegmentOption} import swaydb.core.skiplist.SkipListConcurrent import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave} -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{Slice, SliceOption} import swaydb.utils.OperatingSystem class AppendixLogEntrySpec extends TestBase { @@ -170,6 +170,7 @@ class AppendixLogEntrySpec extends TestBase { scalaSkipList.get(segment4.minKey).value shouldBe segment4 scalaSkipList.get(segment5.minKey).value shouldBe segment5 } + //write skip list to bytes should result in the same skip list as before val bytes = LogEntrySerialiser.write[Slice[Byte], Segment](skipList.iterator) val crcEntries = LogEntrySerialiser.read[Slice[Byte], Segment](bytes, false).value.item.value diff --git a/core/src/test/scala/swaydb/core/log/serialiser/Level0LogEntrySpec.scala b/core/src/test/scala/swaydb/core/log/serialiser/Level0LogEntrySpec.scala index 05342938e..1752e1e47 100644 --- a/core/src/test/scala/swaydb/core/log/serialiser/Level0LogEntrySpec.scala +++ b/core/src/test/scala/swaydb/core/log/serialiser/Level0LogEntrySpec.scala @@ -21,15 +21,15 @@ import swaydb.IO import swaydb.IOValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, MemoryOption} import swaydb.core.file.reader.Reader import swaydb.core.log.LogEntry +import swaydb.core.segment.data.{Memory, MemoryOption} import swaydb.core.skiplist.SkipListConcurrent import swaydb.core.{TestBase, TestTimer} -import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.KeyOrder +import swaydb.slice.{Slice, SliceOption} import swaydb.utils.ByteSizeOf class Level0LogEntrySpec extends TestBase { diff --git a/core/src/test/scala/swaydb/core/log/serialiser/LevelZeroLogEntrySpec.scala b/core/src/test/scala/swaydb/core/log/serialiser/LevelZeroLogEntrySpec.scala index 4a7a3ec42..abdf7027e 100644 --- a/core/src/test/scala/swaydb/core/log/serialiser/LevelZeroLogEntrySpec.scala +++ b/core/src/test/scala/swaydb/core/log/serialiser/LevelZeroLogEntrySpec.scala @@ -22,15 +22,15 @@ import swaydb.IO import swaydb.IOValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, MemoryOption} import swaydb.core.file.reader.Reader import swaydb.core.log.LogEntry +import swaydb.core.segment.data.{Memory, MemoryOption} import swaydb.core.skiplist.SkipListConcurrent import swaydb.core.{TestBase, TestTimer} -import swaydb.slice.order.KeyOrder -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.KeyOrder +import swaydb.slice.{Slice, SliceOption} import swaydb.testkit.RunThis._ import swaydb.utils.ByteSizeOf diff --git a/core/src/test/scala/swaydb/core/log/serialiser/LogEntrySerialiserSpec.scala b/core/src/test/scala/swaydb/core/log/serialiser/LogEntrySerialiserSpec.scala index 8762eb06b..7832b42c2 100644 --- a/core/src/test/scala/swaydb/core/log/serialiser/LogEntrySerialiserSpec.scala +++ b/core/src/test/scala/swaydb/core/log/serialiser/LogEntrySerialiserSpec.scala @@ -26,10 +26,10 @@ import swaydb.core.segment.data._ import swaydb.core.segment.io.SegmentReadIO import swaydb.core.skiplist.SkipListConcurrent import swaydb.core.{TestBase, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.{KeyOrder, TimeOrder} +import swaydb.slice.{Slice, SliceOption} class LogEntrySerialiserSpec extends TestBase { diff --git a/core/src/test/scala/swaydb/core/log/timer/TimerSpec.scala b/core/src/test/scala/swaydb/core/log/timer/TimerSpec.scala index e1b9d8bfe..63613fed1 100644 --- a/core/src/test/scala/swaydb/core/log/timer/TimerSpec.scala +++ b/core/src/test/scala/swaydb/core/log/timer/TimerSpec.scala @@ -16,17 +16,17 @@ package swaydb.core.log.timer -import swaydb.core.segment.FunctionStore +import swaydb.config.MMAP import swaydb.core.file.ForceSaveApplier +import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor import swaydb.core.log.LogEntry import swaydb.core.log.MapTestUtil._ import swaydb.core.log.counter.CounterLog import swaydb.core.log.serialiser.{CounterLogEntryReader, CounterLogEntryWriter, LogEntryReader, LogEntryWriter} -import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.segment.FunctionStore import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestForceSave} -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.OperatingSystem import java.nio.file.Path diff --git a/core/src/test/scala/swaydb/core/segment/KeyMatcherSpec.scala b/core/src/test/scala/swaydb/core/segment/KeyMatcherSpec.scala index 8aff224ad..197aec09c 100644 --- a/core/src/test/scala/swaydb/core/segment/KeyMatcherSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/KeyMatcherSpec.scala @@ -16,18 +16,18 @@ package swaydb.core.segment -import swaydb.core.cache.Cache import swaydb.core.TestBase +import swaydb.core.cache.Cache +import swaydb.core.segment.block.values.ValuesBlockOffset import swaydb.core.segment.data.Persistent._ import swaydb.core.segment.data.Value.FromValueOption import swaydb.core.segment.data.{Persistent, Time, Value} -import swaydb.core.segment.block.values.ValuesBlockOffset import swaydb.core.segment.ref.search.KeyMatcher import swaydb.core.segment.ref.search.KeyMatcher.Result._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import scala.util.Random diff --git a/core/src/test/scala/swaydb/core/segment/SegmentGetSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentGetSpec.scala index 505896410..dca174d1a 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentGetSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentGetSpec.scala @@ -19,17 +19,17 @@ package swaydb.core.segment import org.scalatest.OptionValues._ import org.scalatest.PrivateMethodTester import org.scalatest.concurrent.ScalaFutures +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core.segment.data._ import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestSweeper} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/segment/SegmentHigherSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentHigherSpec.scala index af496cbbe..a72420a33 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentHigherSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentHigherSpec.scala @@ -18,14 +18,14 @@ package swaydb.core.segment import org.scalatest.PrivateMethodTester import org.scalatest.concurrent.ScalaFutures +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave} -import swaydb.config.MMAP -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/segment/SegmentKeyValueCountSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentKeyValueCountSpec.scala index 8ed3300f7..7a0ba5fd2 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentKeyValueCountSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentKeyValueCountSpec.scala @@ -19,9 +19,9 @@ package swaydb.core.segment import org.scalatest.PrivateMethodTester import org.scalatest.concurrent.ScalaFutures import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.TestData._ import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave} -import swaydb.config.MMAP import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/segment/SegmentLowerSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentLowerSpec.scala index 776f044db..ad826520b 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentLowerSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentLowerSpec.scala @@ -19,15 +19,15 @@ package swaydb.core.segment import org.scalatest.OptionValues._ import org.scalatest.PrivateMethodTester import org.scalatest.concurrent.ScalaFutures +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.ref.search.ThreadReadState import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/segment/SegmentMemorySweeperSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentMemorySweeperSpec.scala index e3b3a36f1..6fcdc4e8d 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentMemorySweeperSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentMemorySweeperSpec.scala @@ -17,17 +17,16 @@ package swaydb.core.segment import org.scalatest.OptionValues._ -import swaydb.ActorConfig +import swaydb.{ActorConfig, Benchmark} +import swaydb.config.MemoryCache import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.cache.sweeper.MemorySweeper -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext} -import swaydb.config.MemoryCache -import swaydb.slice.order.TimeOrder import swaydb.slice.Slice +import swaydb.slice.order.TimeOrder import swaydb.testkit.RunThis._ import scala.concurrent.duration._ diff --git a/core/src/test/scala/swaydb/core/segment/SegmentReadSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentReadSpec.scala index b24e8f9ce..69fbb7e2b 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentReadSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentReadSpec.scala @@ -21,19 +21,18 @@ import org.scalatest.concurrent.ScalaFutures import swaydb.Error.Segment.ExceptionHandler import swaydb.IO import swaydb.IOValues._ +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data._ import swaydb.core.segment.block.segment.SegmentBlockConfig +import swaydb.core.segment.data._ import swaydb.core.segment.io.SegmentReadIO -import swaydb.slice.MaxKey -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.effect.Effect import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.{MaxKey, Slice} +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem diff --git a/core/src/test/scala/swaydb/core/segment/SegmentSearcherSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentSearcherSpec.scala index 5a04b4d29..c8e5e5585 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentSearcherSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentSearcherSpec.scala @@ -17,21 +17,21 @@ package swaydb.core.segment import org.scalamock.scalatest.MockFactory import org.scalatest.OptionValues._ +import swaydb.Benchmark import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, Persistent, PersistentOption} import swaydb.core.segment.block.BlockCompressionInfo import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.data.{Memory, Persistent, PersistentOption} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.SegmentSearcher -import swaydb.Benchmark import swaydb.core.{SegmentBlocks, TestBase, TestCaseSweeper} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import scala.util.Try diff --git a/core/src/test/scala/swaydb/core/segment/SegmentSerialiserSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentSerialiserSpec.scala index ba94c7772..4652eb538 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentSerialiserSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentSerialiserSpec.scala @@ -16,15 +16,15 @@ package swaydb.core.segment +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core.file.reader.Reader import swaydb.core.segment.io.SegmentReadIO import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class SegmentSerialiserSpec extends TestBase { diff --git a/core/src/test/scala/swaydb/core/segment/SegmentWriteSpec.scala b/core/src/test/scala/swaydb/core/segment/SegmentWriteSpec.scala index 29c79c653..219814245 100644 --- a/core/src/test/scala/swaydb/core/segment/SegmentWriteSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/SegmentWriteSpec.scala @@ -19,37 +19,36 @@ package swaydb.core.segment import org.scalatest.OptionValues.convertOptionToValuable import swaydb.Error.Segment.ExceptionHandler import swaydb.IOValues._ +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.PrivateMethodInvokers._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core._ -import swaydb.core.segment.data.Value.FromValue -import swaydb.core.segment.data._ +import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.KeyValueMerger -import swaydb.core.segment.data.merge.stats.MergeStats -import swaydb.core.segment.block.{BlockCache, BlockCacheState} +import swaydb.core.segment.block.BlockCacheState import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.HashIndexBlockConfig import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data.Value.FromValue +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.KeyValueMerger +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.SegmentRef import swaydb.core.segment.ref.search.ThreadReadState -import swaydb.core.file.sweeper.{ByteBufferSweeper, FileSweeper} import swaydb.core.util.IDGenerator -import swaydb.slice.MaxKey -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.effect.Effect._ import swaydb.effect.{Dir, Effect, Extension} import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.{MaxKey, Slice} +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ import swaydb.utils.{ByteSizeOf, OperatingSystem} diff --git a/core/src/test/scala/swaydb/core/segment/assigner/Assigner_AssignKeyValues_Spec.scala b/core/src/test/scala/swaydb/core/segment/assigner/Assigner_AssignKeyValues_Spec.scala index bd4f7d77c..1551b6216 100644 --- a/core/src/test/scala/swaydb/core/segment/assigner/Assigner_AssignKeyValues_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/assigner/Assigner_AssignKeyValues_Spec.scala @@ -17,21 +17,21 @@ package swaydb.core.segment.assigner import org.scalatest.OptionValues._ +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, Value} import swaydb.core.segment.Segment +import swaydb.core.segment.data.{Memory, Value} import swaydb.core.segment.io.SegmentReadIO -import swaydb.utils.PipeOps._ import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.effect.Effect._ import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem +import swaydb.utils.PipeOps._ import scala.collection.mutable.ListBuffer import scala.concurrent.duration._ diff --git a/core/src/test/scala/swaydb/core/segment/assigner/SegmentAssigner_Assign_Spec.scala b/core/src/test/scala/swaydb/core/segment/assigner/SegmentAssigner_Assign_Spec.scala index 6831ce7d4..39796f2d5 100644 --- a/core/src/test/scala/swaydb/core/segment/assigner/SegmentAssigner_Assign_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/assigner/SegmentAssigner_Assign_Spec.scala @@ -16,18 +16,18 @@ package swaydb.core.segment.assigner +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.{PersistentSegment, PersistentSegmentMany, PersistentSegmentOne, Segment} -import swaydb.utils.PipeOps._ import swaydb.core.{TestBase, TestCaseSweeper, TestForceSave, TestTimer} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.OperatingSystem +import swaydb.utils.PipeOps._ import scala.collection.mutable.ListBuffer diff --git a/core/src/test/scala/swaydb/core/segment/block/BlockSpec.scala b/core/src/test/scala/swaydb/core/segment/block/BlockSpec.scala index d63c24953..90fa643f4 100644 --- a/core/src/test/scala/swaydb/core/segment/block/BlockSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/BlockSpec.scala @@ -7,8 +7,8 @@ import swaydb.core.segment.block.reader.BlockRefReader import swaydb.core.segment.block.segment.transient.TransientSegmentRef import swaydb.core.segment.block.segment.{SegmentBlock, SegmentBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} -import swaydb.slice.Slice import swaydb.effect.IOAction +import swaydb.slice.Slice import swaydb.testkit.RunThis._ class BlockSpec extends TestBase { diff --git a/core/src/test/scala/swaydb/core/segment/block/SegmentBlockCacheSpec.scala b/core/src/test/scala/swaydb/core/segment/block/SegmentBlockCacheSpec.scala index 2150dd0d0..9884e00a5 100644 --- a/core/src/test/scala/swaydb/core/segment/block/SegmentBlockCacheSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/SegmentBlockCacheSpec.scala @@ -3,10 +3,10 @@ package swaydb.core.segment.block import org.scalatest.OptionValues._ import swaydb.ActorConfig import swaydb.IOValues._ +import swaydb.config.MemoryCache import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.HashIndexBlockConfig @@ -14,20 +14,19 @@ import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.segment.{SegmentBlockCache, SegmentBlockConfig} import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig -import swaydb.core.segment.{PersistentSegment, PersistentSegmentMany, PersistentSegmentOne} import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.Memory +import swaydb.core.segment.{PersistentSegment, PersistentSegmentMany, PersistentSegmentOne} import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.config.MemoryCache -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.effect.IOStrategy import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ import java.util.concurrent.ConcurrentLinkedQueue -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import scala.util.Random diff --git a/core/src/test/scala/swaydb/core/segment/block/SegmentBlockInitialisationSpec.scala b/core/src/test/scala/swaydb/core/segment/block/SegmentBlockInitialisationSpec.scala index f357e6625..6bf9077d8 100644 --- a/core/src/test/scala/swaydb/core/segment/block/SegmentBlockInitialisationSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/SegmentBlockInitialisationSpec.scala @@ -16,25 +16,24 @@ package swaydb.core.segment.block -import swaydb.IO +import swaydb.{Benchmark, IO} +import swaydb.config.MMAP import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data._ import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.{HashIndexBlock, HashIndexBlockConfig} import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data._ import swaydb.core.segment.{PersistentSegmentMany, PersistentSegmentOne} -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper, TestTimer} -import swaydb.config.MMAP -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.effect.IOStrategy import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock_Segment_RandomSearch_Spec.scala b/core/src/test/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock_Segment_RandomSearch_Spec.scala index fcb490b8e..96c18071b 100644 --- a/core/src/test/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock_Segment_RandomSearch_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/binarysearch/BinarySearchIndexBlock_Segment_RandomSearch_Spec.scala @@ -20,14 +20,14 @@ import org.scalatest.OptionValues._ import swaydb.IOValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Memory, Persistent, PersistentOption} import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockConfig} +import swaydb.core.segment.data.{Memory, Persistent, PersistentOption} import swaydb.core.{SegmentBlocks, TestBase, TestCaseSweeper} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import scala.util.Try diff --git a/core/src/test/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlockSpec.scala b/core/src/test/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlockSpec.scala index 35ecb14ce..61b0b04ce 100644 --- a/core/src/test/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlockSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/bloomfilter/BloomFilterBlockSpec.scala @@ -22,9 +22,9 @@ import swaydb.core.TestData._ import swaydb.core.segment.block.reader.{BlockRefReader, UnblockedReader} import swaydb.core.segment.block.{Block, BlockCache} import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.slice.order.KeyOrder import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import scala.util.Random diff --git a/core/src/test/scala/swaydb/core/segment/block/hashindex/HashIndexBlockSpec.scala b/core/src/test/scala/swaydb/core/segment/block/hashindex/HashIndexBlockSpec.scala index 02be63d2d..4fa5daa0b 100644 --- a/core/src/test/scala/swaydb/core/segment/block/hashindex/HashIndexBlockSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/hashindex/HashIndexBlockSpec.scala @@ -18,14 +18,14 @@ package swaydb.core.segment.block.hashindex import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Persistent import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig +import swaydb.core.segment.data.Persistent import swaydb.core.{SegmentBlocks, TestBase, TestCaseSweeper} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ class HashIndexBlockSpec extends TestBase { diff --git a/core/src/test/scala/swaydb/core/segment/block/segment/SegmentBlockSpec.scala b/core/src/test/scala/swaydb/core/segment/block/segment/SegmentBlockSpec.scala index 96b7ee170..d1b89028f 100644 --- a/core/src/test/scala/swaydb/core/segment/block/segment/SegmentBlockSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/segment/SegmentBlockSpec.scala @@ -17,23 +17,23 @@ package swaydb.core.segment.block.segment import org.scalatest.OptionValues._ +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data._ import swaydb.core.file.reader.Reader -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.HashIndexBlockConfig import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockConfig} import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data._ +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.io.SegmentReadIO import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import scala.collection.mutable.ListBuffer diff --git a/core/src/test/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockSpec.scala b/core/src/test/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockSpec.scala index 3d49851c0..a6df3812f 100644 --- a/core/src/test/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/sortedindex/SortedIndexBlockSpec.scala @@ -17,24 +17,22 @@ package swaydb.core.segment.block.sortedindex import org.scalatest.PrivateMethodTester -import swaydb.Compression +import swaydb.{Benchmark, Compression} +import swaydb.config.compression.{LZ4Compressor, LZ4Decompressor, LZ4Instance} +import swaydb.config.{PrefixCompression, UncompressedBlockInfo} import swaydb.core.CommonAssertions._ import swaydb.core.TestBase import swaydb.core.TestData._ -import swaydb.core.segment.data.Persistent -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.block.Block import swaydb.core.segment.block.reader.{BlockRefReader, UnblockedReader} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockConfig, ValuesBlockOffset} +import swaydb.core.segment.data.Persistent +import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.io.SegmentReadIO -import swaydb.Benchmark -import swaydb.config.compression.{LZ4Compressor, LZ4Decompressor, LZ4Instance} -import swaydb.config.{PrefixCompression, UncompressedBlockInfo} import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import scala.collection.mutable.ListBuffer -import scala.collection.parallel.CollectionConverters._ class SortedIndexBlockSpec extends TestBase with PrivateMethodTester { diff --git a/core/src/test/scala/swaydb/core/segment/block/values/ValuesBlockSpec.scala b/core/src/test/scala/swaydb/core/segment/block/values/ValuesBlockSpec.scala index b98b479c4..ecdd4ae3e 100644 --- a/core/src/test/scala/swaydb/core/segment/block/values/ValuesBlockSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/block/values/ValuesBlockSpec.scala @@ -19,18 +19,17 @@ package swaydb.core.segment.block.values import org.scalatest.OptionValues._ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.segment.block.Block import swaydb.core.segment.block.reader.{BlockRefReader, BlockedReader} +import swaydb.core.segment.data.Memory import swaydb.core.segment.entry.writer.EntryWriter import swaydb.core.{TestBase, TestTimer} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import scala.collection.mutable.ListBuffer -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ class ValuesBlockSpec extends TestBase { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMergerSpec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMergerSpec.scala index 211eaccd5..27277ca6f 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMergerSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMergerSpec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class FunctionMergerSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Function_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Function_Spec.scala index 5ebb089a2..1277e7d68 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Function_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Function_Spec.scala @@ -21,8 +21,8 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class FunctionMerger_Function_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_PendingApply_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_PendingApply_Spec.scala index f27edf824..999ba698c 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_PendingApply_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_PendingApply_Spec.scala @@ -23,8 +23,8 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Memory -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class FunctionMerger_PendingApply_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Put_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Put_Spec.scala index fab20bbf7..eba139f98 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Put_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Put_Spec.scala @@ -22,10 +22,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data._ -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class FunctionMerger_Put_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Remove_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Remove_Spec.scala index 7cf47366b..baee10130 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Remove_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Remove_Spec.scala @@ -23,10 +23,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data._ -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class FunctionMerger_Remove_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Update_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Update_Spec.scala index 9e4054d4d..df56b2906 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Update_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/FunctionMerger_Update_Spec.scala @@ -23,8 +23,8 @@ import swaydb.IOValues._ import swaydb.OK import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.{TestData, TestTimer} import swaydb.core.segment.data._ +import swaydb.core.{TestData, TestTimer} import swaydb.serializers.Default._ import swaydb.serializers._ import swaydb.slice.Slice diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Fixed_Into_Range.scala b/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Fixed_Into_Range.scala index a9396fcda..33d276e78 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Fixed_Into_Range.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Fixed_Into_Range.scala @@ -21,10 +21,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.{Memory, Value} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.concurrent.duration._ diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Fixed.scala b/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Fixed.scala index 61da50f31..9da0ad4f0 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Fixed.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Fixed.scala @@ -21,10 +21,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.{Memory, Value} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.util.Random diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Range.scala b/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Range.scala index be26bdf71..c5d05eca2 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Range.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/KeyValueMerger_Range_Into_Range.scala @@ -23,10 +23,10 @@ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Value.FromValueOption import swaydb.core.segment.data.{Memory, Value} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class KeyValueMerger_Range_Into_Range extends AnyWordSpec { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/PendingApplyMergerSpec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/PendingApplyMergerSpec.scala index 0ea40229c..9906be7f8 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/PendingApplyMergerSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/PendingApplyMergerSpec.scala @@ -22,10 +22,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Memory -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class PendingApplyMergerSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/PutMergerSpec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/PutMergerSpec.scala index 245687ccd..e43e011c1 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/PutMergerSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/PutMergerSpec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class PutMergerSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMergerSpec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMergerSpec.scala index ccfa6718e..e9c964d73 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMergerSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMergerSpec.scala @@ -22,10 +22,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Memory -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class RemoveMergerSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Function_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Function_Spec.scala index 41b240ead..51f73c217 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Function_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Function_Spec.scala @@ -23,10 +23,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Memory -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class RemoveMerger_Function_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_PendingApply_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_PendingApply_Spec.scala index a2c6d7f04..fac21a281 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_PendingApply_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_PendingApply_Spec.scala @@ -22,10 +22,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Memory -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class RemoveMerger_PendingApply_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Put_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Put_Spec.scala index e3fdab858..925a625db 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Put_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Put_Spec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class RemoveMerger_Put_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Remove_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Remove_Spec.scala index 07ef46f0d..d744ca472 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Remove_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Remove_Spec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class RemoveMerger_Remove_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Update_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Update_Spec.scala index 845149b44..ea901391b 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Update_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/RemoveMerger_Update_Spec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class RemoveMerger_Update_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMergerSpec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMergerSpec.scala index 4e28db2eb..381c144d7 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMergerSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMergerSpec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class UpdateMergerSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Function_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Function_Spec.scala index d2294079d..0d400173c 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Function_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Function_Spec.scala @@ -23,10 +23,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Memory -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class UpdateMerger_Function_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_PendingApply_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_PendingApply_Spec.scala index 8c15aa200..96feec4b4 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_PendingApply_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_PendingApply_Spec.scala @@ -22,10 +22,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.{KeyValue, Memory} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class UpdateMerger_PendingApply_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Put_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Put_Spec.scala index ee32cdb01..230e236aa 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Put_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Put_Spec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class UpdateMerger_Put_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Remove_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Remove_Spec.scala index 5d201ab41..6238402fe 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Remove_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Remove_Spec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class UpdateMerger_Remove_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Update_Spec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Update_Spec.scala index f7b8c0611..6d1b1cbf9 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Update_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/UpdateMerger_Update_Spec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ class UpdateMerger_Update_Spec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculatorSpec.scala b/core/src/test/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculatorSpec.scala index dff598d22..300a368c4 100644 --- a/core/src/test/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculatorSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/data/merge/stats/MergeStatsSizeCalculatorSpec.scala @@ -19,9 +19,9 @@ package swaydb.core.segment.data.merge.stats import org.scalamock.scalatest.MockFactory import org.scalatest.EitherValues import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig +import swaydb.core.segment.data.Memory import swaydb.core.{TestBase, TestExecutionContext, TestTimer} import swaydb.serializers.Default._ import swaydb.serializers._ diff --git a/core/src/test/scala/swaydb/core/segment/defrag/DefragGapSpec.scala b/core/src/test/scala/swaydb/core/segment/defrag/DefragGapSpec.scala index eef8ffb5b..f7b145ba2 100644 --- a/core/src/test/scala/swaydb/core/segment/defrag/DefragGapSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/defrag/DefragGapSpec.scala @@ -20,17 +20,17 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.EitherValues import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.Memory import swaydb.core.level.PathsDistributor -import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} import swaydb.core.segment._ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig +import swaydb.core.segment.data.Memory +import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunMany_Spec.scala b/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunMany_Spec.scala index 353b079f6..b2cac8ba4 100644 --- a/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunMany_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunMany_Spec.scala @@ -18,6 +18,8 @@ package swaydb.core.segment.defrag import org.scalamock.scalatest.MockFactory import org.scalatest.EitherValues +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.level.PathsDistributor @@ -31,10 +33,8 @@ import swaydb.core.segment.block.values.ValuesBlockConfig import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.{PersistentSegment, PersistentSegmentMany} import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.collection.mutable.ListBuffer diff --git a/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunOne_Spec.scala b/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunOne_Spec.scala index f2edd6931..1ecae17f2 100644 --- a/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunOne_Spec.scala +++ b/core/src/test/scala/swaydb/core/segment/defrag/DefragSegment_RunOne_Spec.scala @@ -18,10 +18,10 @@ package swaydb.core.segment.defrag import org.scalamock.scalatest.MockFactory import org.scalatest.EitherValues +import swaydb.config.MMAP +import swaydb.config.compaction.CompactionConfig.CompactionParallelism import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{KeyValue, Memory} -import swaydb.core.segment.data.merge.stats.MergeStats import swaydb.core.segment.assigner.Assignable import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig @@ -29,15 +29,15 @@ import swaydb.core.segment.block.hashindex.HashIndexBlockConfig import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data.merge.stats.MergeStats +import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.{PersistentSegment, Segment} import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.config.compaction.CompactionConfig.CompactionParallelism -import swaydb.config.MMAP -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.collection.compat._ diff --git a/core/src/test/scala/swaydb/core/segment/defrag/DefragSpec.scala b/core/src/test/scala/swaydb/core/segment/defrag/DefragSpec.scala index 532aa5bcd..a5f8625cc 100644 --- a/core/src/test/scala/swaydb/core/segment/defrag/DefragSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/defrag/DefragSpec.scala @@ -20,8 +20,6 @@ import org.scalamock.scalatest.MockFactory import org.scalatest.EitherValues import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{KeyValue, Memory} -import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} import swaydb.core.segment._ import swaydb.core.segment.block.binarysearch.BinarySearchIndexBlockConfig import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig @@ -30,11 +28,13 @@ import swaydb.core.segment.block.segment.SegmentBlockConfig import swaydb.core.segment.block.segment.transient.TransientSegment import swaydb.core.segment.block.sortedindex.SortedIndexBlockConfig import swaydb.core.segment.block.values.ValuesBlockConfig +import swaydb.core.segment.data.merge.stats.{MergeStats, MergeStatsCreator, MergeStatsSizeCalculator} +import swaydb.core.segment.data.{KeyValue, Memory} import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext, TestTimer} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import scala.collection.mutable.ListBuffer diff --git a/core/src/test/scala/swaydb/core/segment/entry/EntryReaderWriterSpec.scala b/core/src/test/scala/swaydb/core/segment/entry/EntryReaderWriterSpec.scala index adda87a4c..f48dec267 100644 --- a/core/src/test/scala/swaydb/core/segment/entry/EntryReaderWriterSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/entry/EntryReaderWriterSpec.scala @@ -21,15 +21,15 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.TestTimer -import swaydb.core.segment.data.{Memory, Persistent} import swaydb.core.file.reader.Reader +import swaydb.core.segment.data.{Memory, Persistent} import swaydb.core.segment.entry.id.MemoryToKeyValueIdBinder import swaydb.core.segment.entry.reader.PersistentParser import swaydb.core.segment.entry.writer._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import scala.util.Random diff --git a/core/src/test/scala/swaydb/core/segment/entry/writer/ValueReaderWriterSpec.scala b/core/src/test/scala/swaydb/core/segment/entry/writer/ValueReaderWriterSpec.scala index 52acadf49..012cb645a 100644 --- a/core/src/test/scala/swaydb/core/segment/entry/writer/ValueReaderWriterSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/entry/writer/ValueReaderWriterSpec.scala @@ -22,9 +22,9 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.data.{Memory, Time} import swaydb.core.segment.entry.id.{BaseEntryId, MemoryToKeyValueIdBinder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ class ValueReaderWriterSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/segment/ref/SegmentRefGetBehaviorSpec.scala b/core/src/test/scala/swaydb/core/segment/ref/SegmentRefGetBehaviorSpec.scala index 70ad02107..eef6429b9 100644 --- a/core/src/test/scala/swaydb/core/segment/ref/SegmentRefGetBehaviorSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/ref/SegmentRefGetBehaviorSpec.scala @@ -19,22 +19,21 @@ package swaydb.core.segment.ref import org.scalamock.scalatest.MockFactory import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ -import swaydb.core.segment.data.{Persistent, PersistentOption, Time} import swaydb.core.segment.block.binarysearch.{BinarySearchIndexBlock, BinarySearchIndexBlockOffset} import swaydb.core.segment.block.bloomfilter.BloomFilterBlockConfig import swaydb.core.segment.block.hashindex.{HashIndexBlock, HashIndexBlockOffset} import swaydb.core.segment.block.reader.UnblockedReader import swaydb.core.segment.block.sortedindex.{SortedIndexBlock, SortedIndexBlockOffset} import swaydb.core.segment.block.values.{ValuesBlock, ValuesBlockOffset} +import swaydb.core.segment.cache.sweeper.MemorySweeper +import swaydb.core.segment.data.{Persistent, PersistentOption, Time} import swaydb.core.segment.io.SegmentReadIO import swaydb.core.segment.ref.search.{SegmentSearcher, ThreadReadState} -import swaydb.core.segment.cache.sweeper.MemorySweeper import swaydb.core.{TestBase, TestCaseSweeper, TestExecutionContext} -import swaydb.slice.MaxKey -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.{MaxKey, Slice} +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.testkit.RunThis._ import java.nio.file.Paths diff --git a/core/src/test/scala/swaydb/core/segment/ref/search/SegmentReadStateSpec.scala b/core/src/test/scala/swaydb/core/segment/ref/search/SegmentReadStateSpec.scala index 2619f1890..2df690a45 100644 --- a/core/src/test/scala/swaydb/core/segment/ref/search/SegmentReadStateSpec.scala +++ b/core/src/test/scala/swaydb/core/segment/ref/search/SegmentReadStateSpec.scala @@ -21,9 +21,9 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.core.CommonAssertions._ import swaydb.core.TestData._ import swaydb.core.segment.data.{Persistent, Time} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.TupleOrNone diff --git a/core/src/test/scala/swaydb/core/util/BloomFilterMemoryUsage.scala b/core/src/test/scala/swaydb/core/util/BloomFilterMemoryUsage.scala index 37b68f931..4810707b9 100644 --- a/core/src/test/scala/swaydb/core/util/BloomFilterMemoryUsage.scala +++ b/core/src/test/scala/swaydb/core/util/BloomFilterMemoryUsage.scala @@ -17,8 +17,8 @@ package swaydb.core.util import swaydb.core.segment.block.bloomfilter.BloomFilterBlock -import swaydb.slice.order.KeyOrder import swaydb.serializers.Default.LongSerializer +import swaydb.slice.order.KeyOrder object BloomFilterMemoryUsage extends App { diff --git a/core/src/test/scala/swaydb/core/util/BytesSpec.scala b/core/src/test/scala/swaydb/core/util/BytesSpec.scala index 269e4f1e1..8787c6c53 100644 --- a/core/src/test/scala/swaydb/core/util/BytesSpec.scala +++ b/core/src/test/scala/swaydb/core/util/BytesSpec.scala @@ -23,9 +23,9 @@ import swaydb.IOValues._ import swaydb.OK import swaydb.core.TestData._ import swaydb.core.file.reader.Reader -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/core/src/test/scala/swaydb/core/util/CollectionsSpec.scala b/core/src/test/scala/swaydb/core/util/CollectionsSpec.scala index 9e8a83a1b..07965e5a5 100644 --- a/core/src/test/scala/swaydb/core/util/CollectionsSpec.scala +++ b/core/src/test/scala/swaydb/core/util/CollectionsSpec.scala @@ -19,9 +19,9 @@ package swaydb.core.util import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.Benchmark -import swaydb.utils.Collections._ import swaydb.slice.Slice import swaydb.utils.Collections +import swaydb.utils.Collections._ import scala.collection.mutable.{ArrayBuffer, ListBuffer} diff --git a/core/src/test/scala/swaydb/core/util/DropIteratorSpec.scala b/core/src/test/scala/swaydb/core/util/DropIteratorSpec.scala index 6ecbbf19d..6dc068d38 100644 --- a/core/src/test/scala/swaydb/core/util/DropIteratorSpec.scala +++ b/core/src/test/scala/swaydb/core/util/DropIteratorSpec.scala @@ -23,9 +23,9 @@ import swaydb.core.TestData._ import swaydb.core.TestTimer import swaydb.core.segment.data.Value.FromValue import swaydb.core.segment.data.{KeyValue, Memory, Value} -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice import swaydb.utils.DropIterator class DropIteratorSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/util/IDGeneratorSpec.scala b/core/src/test/scala/swaydb/core/util/IDGeneratorSpec.scala index 82716767b..a74308d38 100644 --- a/core/src/test/scala/swaydb/core/util/IDGeneratorSpec.scala +++ b/core/src/test/scala/swaydb/core/util/IDGeneratorSpec.scala @@ -19,8 +19,6 @@ package swaydb.core.util import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers -import scala.collection.parallel.CollectionConverters._ - class IDGeneratorSpec extends AnyFlatSpec with Matchers { it should "always return new incremental ids when access concurrently" in { diff --git a/core/src/test/scala/swaydb/core/util/KeyCompressorSpec.scala b/core/src/test/scala/swaydb/core/util/KeyCompressorSpec.scala index ceae3be69..5adeb149a 100644 --- a/core/src/test/scala/swaydb/core/util/KeyCompressorSpec.scala +++ b/core/src/test/scala/swaydb/core/util/KeyCompressorSpec.scala @@ -21,10 +21,10 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.IOValues._ import swaydb.core.TestData._ import swaydb.core.segment.data.Memory -import swaydb.slice.MaxKey -import swaydb.slice.order.KeyOrder import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.MaxKey +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ class KeyCompressorSpec extends AnyWordSpec with Matchers { diff --git a/core/src/test/scala/swaydb/core/util/MinMaxSpec.scala b/core/src/test/scala/swaydb/core/util/MinMaxSpec.scala index 8a1d8daf0..32da4fd79 100644 --- a/core/src/test/scala/swaydb/core/util/MinMaxSpec.scala +++ b/core/src/test/scala/swaydb/core/util/MinMaxSpec.scala @@ -21,10 +21,10 @@ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.core.TestData._ import swaydb.core.segment.data.{Time, Value} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ import swaydb.serializers._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.ByteSizeOf diff --git a/effect/src/main/scala/swaydb/Benchmark.scala b/effect/src/main/scala/swaydb/Benchmark.scala index 0283e957e..513173f13 100644 --- a/effect/src/main/scala/swaydb/Benchmark.scala +++ b/effect/src/main/scala/swaydb/Benchmark.scala @@ -19,7 +19,6 @@ package swaydb import com.typesafe.scalalogging.LazyLogging import swaydb.Bag.Implicits._ import swaydb.utils.Maths -import swaydb.{Bag, Glass} import java.lang.management.ManagementFactory import java.util.function.Supplier diff --git a/slice/src/main/scala-2.13/swaydb/slice/SliceBuildFrom.scala b/slice/src/main/scala-2.13/swaydb/slice/SliceBuildFrom.scala index 04c646b59..a8dbbbe86 100644 --- a/slice/src/main/scala-2.13/swaydb/slice/SliceBuildFrom.scala +++ b/slice/src/main/scala-2.13/swaydb/slice/SliceBuildFrom.scala @@ -18,7 +18,7 @@ package swaydb.slice import com.typesafe.scalalogging.LazyLogging -import scala.collection.{BuildFrom, mutable} +import scala.collection.mutable import scala.reflect.ClassTag /** diff --git a/slice/src/main/scala-2.13/swaydb/slice/SliceFactory.scala b/slice/src/main/scala-2.13/swaydb/slice/SliceFactory.scala index 6a562e38e..ad4a15cce 100644 --- a/slice/src/main/scala-2.13/swaydb/slice/SliceFactory.scala +++ b/slice/src/main/scala-2.13/swaydb/slice/SliceFactory.scala @@ -17,7 +17,7 @@ package swaydb.slice import scala.collection.compat.IterableOnce -import scala.collection.{ClassTagIterableFactory, mutable} +import scala.collection.mutable import scala.reflect.ClassTag class SliceFactory(maxSize: Int) extends ClassTagIterableFactory[Slice] { diff --git a/slice/src/main/scala/swaydb/slice/MaxKey.scala b/slice/src/main/scala/swaydb/slice/MaxKey.scala index e29128ba4..fb51788e2 100644 --- a/slice/src/main/scala/swaydb/slice/MaxKey.scala +++ b/slice/src/main/scala/swaydb/slice/MaxKey.scala @@ -17,7 +17,6 @@ package swaydb.slice import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.utils.SomeOrNoneCovariant sealed trait MaxKeyOption[+T] extends SomeOrNoneCovariant[MaxKeyOption[T], MaxKey[T]] { diff --git a/slice/src/main/scala/swaydb/slice/SliceCompanion.scala b/slice/src/main/scala/swaydb/slice/SliceCompanion.scala index af96b803f..28f224e5a 100644 --- a/slice/src/main/scala/swaydb/slice/SliceCompanion.scala +++ b/slice/src/main/scala/swaydb/slice/SliceCompanion.scala @@ -16,9 +16,8 @@ package swaydb.slice -import swaydb.utils.Aggregator import swaydb.slice.utils.ByteOps -import swaydb.utils.ByteSizeOf +import swaydb.utils.{Aggregator, ByteSizeOf} import java.lang import java.nio.ByteBuffer diff --git a/slice/src/main/scala/swaydb/slice/utils/ByteOps.scala b/slice/src/main/scala/swaydb/slice/utils/ByteOps.scala index 62df2e0ac..2fda58134 100644 --- a/slice/src/main/scala/swaydb/slice/utils/ByteOps.scala +++ b/slice/src/main/scala/swaydb/slice/utils/ByteOps.scala @@ -16,7 +16,7 @@ package swaydb.slice.utils -import swaydb.slice.{ReaderBase, Slice, SliceMut, SliceRO, SliceReader} +import swaydb.slice._ import swaydb.utils.Maybe.Maybe import java.nio.charset.Charset diff --git a/slice/src/main/scala/swaydb/slice/utils/ScalaByteOps.scala b/slice/src/main/scala/swaydb/slice/utils/ScalaByteOps.scala index ed4280878..6a9f0c0d6 100644 --- a/slice/src/main/scala/swaydb/slice/utils/ScalaByteOps.scala +++ b/slice/src/main/scala/swaydb/slice/utils/ScalaByteOps.scala @@ -16,7 +16,7 @@ package swaydb.slice.utils -import swaydb.slice.{ReaderBase, Slice, SliceMut, SliceRO, SliceReader} +import swaydb.slice._ import swaydb.utils.Maybe.Maybe import swaydb.utils.{ByteSizeOf, Maybe} diff --git a/stress/src/test/scala/swaydb/stress/simulation/Domain.scala b/stress/src/test/scala/swaydb/stress/simulation/Domain.scala index 7126711fd..39aaf9c88 100644 --- a/stress/src/test/scala/swaydb/stress/simulation/Domain.scala +++ b/stress/src/test/scala/swaydb/stress/simulation/Domain.scala @@ -16,8 +16,8 @@ package swaydb.stress.simulation -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice sealed trait Domain object Domain { diff --git a/stress/src/test/scala/swaydb/stress/simulation/SimulationSpec.scala b/stress/src/test/scala/swaydb/stress/simulation/SimulationSpec.scala index 66199e471..29e536607 100644 --- a/stress/src/test/scala/swaydb/stress/simulation/SimulationSpec.scala +++ b/stress/src/test/scala/swaydb/stress/simulation/SimulationSpec.scala @@ -21,12 +21,12 @@ import org.scalatest.wordspec.AnyWordSpec import swaydb.ActorConfig.QueueOrder import swaydb.PureFunctionScala._ import swaydb.api.TestBaseEmbedded +import swaydb.config.Functions import swaydb.core.TestCaseSweeper import swaydb.core.TestData._ -import swaydb.config.Functions -import swaydb.slice.Slice import swaydb.function.FunctionConverter import swaydb.serializers.Default._ +import swaydb.slice.Slice import swaydb.stress.simulation.Domain._ import swaydb.stress.simulation.ProductCommand._ import swaydb.stress.simulation.RemoveAsserted._ diff --git a/stress/src/test/scala/swaydb/stress/simulation/SimulationSuiteSpec.scala b/stress/src/test/scala/swaydb/stress/simulation/SimulationSuiteSpec.scala index 004cbe956..d367b937c 100644 --- a/stress/src/test/scala/swaydb/stress/simulation/SimulationSuiteSpec.scala +++ b/stress/src/test/scala/swaydb/stress/simulation/SimulationSuiteSpec.scala @@ -16,9 +16,9 @@ package swaydb.stress.simulation +import swaydb.config.{Atomic, Functions} import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ -import swaydb.config.{Atomic, Functions} import swaydb.serializers.Default._ import swaydb.stress.simulation.Domain._ import swaydb.{IO, PureFunction} diff --git a/stress/src/test/scala/swaydb/stress/weather/WeatherDataSuiteSpec.scala b/stress/src/test/scala/swaydb/stress/weather/WeatherDataSuiteSpec.scala index c826a0f14..20695113e 100644 --- a/stress/src/test/scala/swaydb/stress/weather/WeatherDataSuiteSpec.scala +++ b/stress/src/test/scala/swaydb/stress/weather/WeatherDataSuiteSpec.scala @@ -17,9 +17,9 @@ package swaydb.stress.weather import swaydb.IO +import swaydb.config.Atomic import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ -import swaydb.config.Atomic import swaydb.serializers.Default._ class Memory_NonAtomic_WeatherDataSpec extends WeatherDataSpec { diff --git a/swaydb-java/src/main/scala/swaydb/java/KeyComparator.scala b/swaydb-java/src/main/scala/swaydb/java/KeyComparator.scala index aa3171dfd..86e7bba21 100644 --- a/swaydb-java/src/main/scala/swaydb/java/KeyComparator.scala +++ b/swaydb-java/src/main/scala/swaydb/java/KeyComparator.scala @@ -16,8 +16,8 @@ package swaydb.java -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.Java.JavaFunction import java.util.Comparator diff --git a/swaydb-java/src/main/scala/swaydb/java/KeyOrderConverter.scala b/swaydb-java/src/main/scala/swaydb/java/KeyOrderConverter.scala index 42aa7cef1..b4aca1977 100644 --- a/swaydb-java/src/main/scala/swaydb/java/KeyOrderConverter.scala +++ b/swaydb-java/src/main/scala/swaydb/java/KeyOrderConverter.scala @@ -16,9 +16,9 @@ package swaydb.java -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder protected object KeyOrderConverter { diff --git a/swaydb-java/src/main/scala/swaydb/java/Map.scala b/swaydb-java/src/main/scala/swaydb/java/Map.scala index a30780238..ebd683ef7 100644 --- a/swaydb-java/src/main/scala/swaydb/java/Map.scala +++ b/swaydb-java/src/main/scala/swaydb/java/Map.scala @@ -23,10 +23,10 @@ import swaydb.java.util.Java._ import swaydb.utils.Java._ import swaydb.{Expiration, Glass, Prepare, PureFunction} +import java.lang import java.nio.file.Path import java.time.Duration import java.util.Optional -import java.{lang, util} import scala.compat.java8.DurationConverters._ import scala.concurrent.duration import scala.jdk.CollectionConverters._ diff --git a/swaydb-java/src/main/scala/swaydb/java/MapT.scala b/swaydb-java/src/main/scala/swaydb/java/MapT.scala index 321049db4..9f6ba0289 100644 --- a/swaydb-java/src/main/scala/swaydb/java/MapT.scala +++ b/swaydb-java/src/main/scala/swaydb/java/MapT.scala @@ -16,7 +16,6 @@ package swaydb.java -import swaydb.java.{KeyVal, Pair} import swaydb.{Expiration, Prepare} import java.time.Duration diff --git a/swaydb-java/src/main/scala/swaydb/java/MultiMap.scala b/swaydb-java/src/main/scala/swaydb/java/MultiMap.scala index 3ed855f05..558f3c08a 100644 --- a/swaydb-java/src/main/scala/swaydb/java/MultiMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/MultiMap.scala @@ -18,17 +18,16 @@ package swaydb.java import swaydb.config.accelerate.LevelZeroMeter import swaydb.config.compaction.LevelMeter +import swaydb.java.KeyVal._ import swaydb.java.util.Java._ import swaydb.multimap.MultiPrepare import swaydb.utils.Java._ -import swaydb.java.{KeyVal, Pair} -import swaydb.java.KeyVal._ import swaydb.{Expiration, Glass, Prepare, PureFunction} +import java.lang import java.nio.file.Path import java.time.Duration import java.util.Optional -import java.{lang, util} import scala.compat.java8.DurationConverters._ import scala.concurrent.duration import scala.jdk.CollectionConverters._ diff --git a/swaydb-java/src/main/scala/swaydb/java/Set.scala b/swaydb-java/src/main/scala/swaydb/java/Set.scala index 4de4abddc..c424133d2 100644 --- a/swaydb-java/src/main/scala/swaydb/java/Set.scala +++ b/swaydb-java/src/main/scala/swaydb/java/Set.scala @@ -22,9 +22,9 @@ import swaydb.java.util.Java._ import swaydb.utils.Java._ import swaydb.{Apply, Expiration, Glass, Prepare, PureFunction} +import java.lang import java.nio.file.Path import java.util.Optional -import java.{lang, util} import scala.compat.java8.DurationConverters._ import scala.jdk.CollectionConverters._ diff --git a/swaydb-java/src/main/scala/swaydb/java/SetMap.scala b/swaydb-java/src/main/scala/swaydb/java/SetMap.scala index 3723ed2ad..202ed7120 100644 --- a/swaydb-java/src/main/scala/swaydb/java/SetMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/SetMap.scala @@ -25,7 +25,6 @@ import swaydb.{Expiration, Glass} import java.nio.file.Path import java.time.Duration -import java.util import java.util.Optional import scala.compat.java8.DurationConverters._ import scala.jdk.CollectionConverters._ diff --git a/swaydb-java/src/main/scala/swaydb/java/Stream.scala b/swaydb-java/src/main/scala/swaydb/java/Stream.scala index bf8cdc8c2..c0534641f 100644 --- a/swaydb-java/src/main/scala/swaydb/java/Stream.scala +++ b/swaydb-java/src/main/scala/swaydb/java/Stream.scala @@ -19,9 +19,9 @@ package swaydb.java import swaydb.utils.Java._ import swaydb.{Bag, Glass} +import java.lang import java.util.Optional import java.util.function.{BiFunction, Consumer, Predicate} -import java.{lang, util} import scala.compat.java8.FunctionConverters._ import scala.jdk.CollectionConverters._ diff --git a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMap.scala b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMap.scala index b17606ca6..c71e11c23 100644 --- a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMap.scala @@ -16,19 +16,18 @@ package swaydb.java.eventually.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.eventually.persistent.DefaultConfigs import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.java.{KeyComparator, KeyOrderConverter} import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java._ import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMultiMap.scala b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMultiMap.scala index aeb7917de..1e34b5b20 100644 --- a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMultiMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentMultiMap.scala @@ -16,19 +16,18 @@ package swaydb.java.eventually.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.eventually.persistent.DefaultConfigs import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.java.{KeyComparator, KeyOrderConverter} import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java._ import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentQueue.scala b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentQueue.scala index 6aa7df127..a0fe61e3d 100644 --- a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentQueue.scala +++ b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentQueue.scala @@ -16,17 +16,16 @@ package swaydb.java.eventually.persistent -import swaydb.configs.level.DefaultExecutionContext import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig import swaydb.config._ -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.eventually.persistent.DefaultConfigs import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.serializers.Serializer +import swaydb.slice.Slice import swaydb.utils.Java.JavaFunction import swaydb.utils.StorageUnits._ import swaydb.{Bag, CommonConfigs, Glass} diff --git a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSet.scala b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSet.scala index 5958f7975..941fe7e09 100644 --- a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSet.scala +++ b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSet.scala @@ -16,19 +16,18 @@ package swaydb.java.eventually.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.eventually.persistent.DefaultConfigs import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java._ import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSetMap.scala b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSetMap.scala index 0c8cad24d..171221a91 100644 --- a/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSetMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/eventually/persistent/EventuallyPersistentSetMap.scala @@ -16,19 +16,18 @@ package swaydb.java.eventually.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.eventually.persistent.DefaultConfigs import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java._ import swaydb.utils.StorageUnits._ import swaydb.{Bag, CommonConfigs, Glass} diff --git a/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMap.scala b/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMap.scala index 4c118c111..1e983ab7a 100644 --- a/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMap.scala @@ -16,18 +16,17 @@ package swaydb.java.memory -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, ThreadStateCache} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.java.{KeyComparator, KeyOrderConverter} import swaydb.memory.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMultiMap.scala b/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMultiMap.scala index c0a8dc674..15da96918 100644 --- a/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMultiMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/memory/MemoryMultiMap.scala @@ -16,18 +16,17 @@ package swaydb.java.memory -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, ThreadStateCache} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.java.{KeyComparator, KeyOrderConverter, MultiMap} import swaydb.memory.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/memory/MemoryQueue.scala b/swaydb-java/src/main/scala/swaydb/java/memory/MemoryQueue.scala index b075ddeba..3f3a47d08 100644 --- a/swaydb-java/src/main/scala/swaydb/java/memory/MemoryQueue.scala +++ b/swaydb-java/src/main/scala/swaydb/java/memory/MemoryQueue.scala @@ -16,11 +16,10 @@ package swaydb.java.memory -import swaydb.configs.level.DefaultExecutionContext import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, ThreadStateCache} -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.config.{Atomic, FileCache, OptimiseWrites, ThreadStateCache} +import swaydb.configs.level.DefaultExecutionContext import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.memory.DefaultConfigs import swaydb.serializers.Serializer diff --git a/swaydb-java/src/main/scala/swaydb/java/memory/MemorySet.scala b/swaydb-java/src/main/scala/swaydb/java/memory/MemorySet.scala index c749f2d36..0067bd53b 100644 --- a/swaydb-java/src/main/scala/swaydb/java/memory/MemorySet.scala +++ b/swaydb-java/src/main/scala/swaydb/java/memory/MemorySet.scala @@ -16,18 +16,17 @@ package swaydb.java.memory -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, ThreadStateCache} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.memory.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/memory/MemorySetMap.scala b/swaydb-java/src/main/scala/swaydb/java/memory/MemorySetMap.scala index 0582cf27c..4f883ed50 100644 --- a/swaydb-java/src/main/scala/swaydb/java/memory/MemorySetMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/memory/MemorySetMap.scala @@ -16,18 +16,17 @@ package swaydb.java.memory -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, ThreadStateCache} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.config.{Atomic, FileCache, OptimiseWrites, ThreadStateCache} +import swaydb.configs.level.DefaultExecutionContext import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.memory.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.{Bag, CommonConfigs, Glass} diff --git a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMap.scala b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMap.scala index 0ba08907e..d7128f461 100644 --- a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMap.scala @@ -16,19 +16,18 @@ package swaydb.java.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.java.{KeyComparator, KeyOrderConverter} import swaydb.persistent.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMultiMap.scala b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMultiMap.scala index 78ca330a3..aa72125a8 100644 --- a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMultiMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentMultiMap.scala @@ -16,19 +16,18 @@ package swaydb.java.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.java.{KeyComparator, KeyOrderConverter} import swaydb.persistent.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentQueue.scala b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentQueue.scala index 922d26da1..db581d97b 100644 --- a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentQueue.scala +++ b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentQueue.scala @@ -16,11 +16,10 @@ package swaydb.java.persistent -import swaydb.configs.level.DefaultExecutionContext import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.persistent.DefaultConfigs diff --git a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSet.scala b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSet.scala index 56d85015e..f2b1b221c 100644 --- a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSet.scala +++ b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSet.scala @@ -16,19 +16,18 @@ package swaydb.java.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.persistent.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, CommonConfigs, Glass, PureFunction} diff --git a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSetMap.scala b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSetMap.scala index 6232464d1..13f81ee67 100644 --- a/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSetMap.scala +++ b/swaydb-java/src/main/scala/swaydb/java/persistent/PersistentSetMap.scala @@ -16,19 +16,18 @@ package swaydb.java.persistent -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import swaydb.effect.Dir import swaydb.java._ import swaydb.java.serializers.{SerializerConverter, Serializer => JavaSerializer} import swaydb.persistent.DefaultConfigs import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.Java.JavaFunction import swaydb.utils.StorageUnits._ import swaydb.{Bag, CommonConfigs, Glass} diff --git a/swaydb-java/src/main/scala/swaydb/java/serializers/Default.scala b/swaydb-java/src/main/scala/swaydb/java/serializers/Default.scala index c7417edbb..edb7dd5e1 100644 --- a/swaydb-java/src/main/scala/swaydb/java/serializers/Default.scala +++ b/swaydb-java/src/main/scala/swaydb/java/serializers/Default.scala @@ -16,8 +16,8 @@ package swaydb.java.serializers -import swaydb.slice.Slice import swaydb.serializers.Default._ +import swaydb.slice.Slice import java.nio.charset.StandardCharsets import java.util.Optional diff --git a/swaydb-java/src/main/scala/swaydb/java/serializers/SerializerConverter.scala b/swaydb-java/src/main/scala/swaydb/java/serializers/SerializerConverter.scala index 6ecb13145..7998ff649 100644 --- a/swaydb-java/src/main/scala/swaydb/java/serializers/SerializerConverter.scala +++ b/swaydb-java/src/main/scala/swaydb/java/serializers/SerializerConverter.scala @@ -16,9 +16,9 @@ package swaydb.java.serializers -import swaydb.slice.Slice import swaydb.java.serializers.{Serializer => JavaSerializer} import swaydb.serializers.{Serializer => ScalaSerializer} +import swaydb.slice.Slice object SerializerConverter { diff --git a/swaydb-java/src/test/java/swaydb/java/ActorTest.java b/swaydb-java/src/test/java/swaydb/java/ActorTest.java index 77e32566e..fef00f08f 100644 --- a/swaydb-java/src/test/java/swaydb/java/ActorTest.java +++ b/swaydb-java/src/test/java/swaydb/java/ActorTest.java @@ -18,7 +18,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.ThrowingSupplier; -import swaydb.java.Actor; import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.ExecutorService; diff --git a/swaydb-java/src/test/java/swaydb/java/IODeferTest.java b/swaydb-java/src/test/java/swaydb/java/IODeferTest.java index aebbe8f5f..01472d152 100644 --- a/swaydb-java/src/test/java/swaydb/java/IODeferTest.java +++ b/swaydb-java/src/test/java/swaydb/java/IODeferTest.java @@ -17,7 +17,6 @@ package swaydb.java; import org.junit.jupiter.api.Test; -import swaydb.java.IO; import static org.junit.jupiter.api.Assertions.*; diff --git a/swaydb-java/src/test/java/swaydb/java/IOLeftTest.java b/swaydb-java/src/test/java/swaydb/java/IOLeftTest.java index 514bbe6d1..44c052408 100644 --- a/swaydb-java/src/test/java/swaydb/java/IOLeftTest.java +++ b/swaydb-java/src/test/java/swaydb/java/IOLeftTest.java @@ -17,7 +17,6 @@ package swaydb.java; import org.junit.jupiter.api.Test; -import swaydb.java.IO; import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/swaydb-java/src/test/java/swaydb/java/IORightTest.java b/swaydb-java/src/test/java/swaydb/java/IORightTest.java index 399d40e9a..a324b7e23 100644 --- a/swaydb-java/src/test/java/swaydb/java/IORightTest.java +++ b/swaydb-java/src/test/java/swaydb/java/IORightTest.java @@ -17,7 +17,6 @@ package swaydb.java; import org.junit.jupiter.api.Test; -import swaydb.java.IO; import java.util.NoSuchElementException; import java.util.Optional; diff --git a/swaydb-java/src/test/java/swaydb/java/IOTest.java b/swaydb-java/src/test/java/swaydb/java/IOTest.java index e3ee7bc5b..684ed85a6 100644 --- a/swaydb-java/src/test/java/swaydb/java/IOTest.java +++ b/swaydb-java/src/test/java/swaydb/java/IOTest.java @@ -17,7 +17,6 @@ package swaydb.java; import org.junit.jupiter.api.Test; -import swaydb.java.IO; import javax.naming.NoPermissionException; diff --git a/swaydb-java/src/test/java/swaydb/java/MapFunctionsOffTest.java b/swaydb-java/src/test/java/swaydb/java/MapFunctionsOffTest.java index 43d0aeac5..12f170a95 100644 --- a/swaydb-java/src/test/java/swaydb/java/MapFunctionsOffTest.java +++ b/swaydb-java/src/test/java/swaydb/java/MapFunctionsOffTest.java @@ -22,12 +22,9 @@ import org.junit.jupiter.api.Test; import scala.Int; import swaydb.Prepare; -import swaydb.java.TestBase; import swaydb.java.serializers.Serializer; import swaydb.slice.Slice; import swaydb.slice.utils.ByteOps; -import swaydb.java.KeyVal; -import swaydb.java.Pair; import java.io.IOException; import java.time.Duration; diff --git a/swaydb-java/src/test/java/swaydb/java/MapFunctionsOnTest.java b/swaydb-java/src/test/java/swaydb/java/MapFunctionsOnTest.java index 83e80ea61..f3fc66c21 100644 --- a/swaydb-java/src/test/java/swaydb/java/MapFunctionsOnTest.java +++ b/swaydb-java/src/test/java/swaydb/java/MapFunctionsOnTest.java @@ -17,12 +17,12 @@ package swaydb.java; import org.junit.jupiter.api.Test; +import swaydb.Apply; import swaydb.Exception; -import swaydb.*; +import swaydb.Prepare; +import swaydb.PureFunction; import swaydb.core.Core; -import swaydb.java.TestBase; import swaydb.java.serializers.Serializer; -import swaydb.java.KeyVal; import java.io.IOException; import java.time.Duration; diff --git a/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOffTest.java b/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOffTest.java index e827695e4..7db3887e8 100644 --- a/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOffTest.java +++ b/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOffTest.java @@ -18,7 +18,6 @@ import org.junit.jupiter.api.Test; import swaydb.Prepare; -import swaydb.java.TestBase; import swaydb.java.multimap.MultiPrepareBuilder; import swaydb.java.serializers.Serializer; import swaydb.java.table.domain.table.key.Key; diff --git a/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOnTest.java b/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOnTest.java index fd403c018..ba14783c8 100644 --- a/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOnTest.java +++ b/swaydb-java/src/test/java/swaydb/java/MultiMapFunctionsOnTest.java @@ -18,7 +18,6 @@ import swaydb.Apply; import swaydb.PureFunction; -import swaydb.java.TestBase; import swaydb.java.serializers.Serializer; import java.io.IOException; diff --git a/swaydb-java/src/test/java/swaydb/java/PersistentReportRebootErrorsTest.java b/swaydb-java/src/test/java/swaydb/java/PersistentReportRebootErrorsTest.java index eaa7e8e1e..5be01ab90 100644 --- a/swaydb-java/src/test/java/swaydb/java/PersistentReportRebootErrorsTest.java +++ b/swaydb-java/src/test/java/swaydb/java/PersistentReportRebootErrorsTest.java @@ -19,7 +19,6 @@ import org.junit.jupiter.api.Test; import swaydb.Exception; import swaydb.config.DataType; -import swaydb.java.TestBase; import swaydb.java.persistent.PersistentMap; import swaydb.java.persistent.PersistentSet; diff --git a/swaydb-java/src/test/java/swaydb/java/QueueTest.java b/swaydb-java/src/test/java/swaydb/java/QueueTest.java index 6cef3d792..e41307fee 100644 --- a/swaydb-java/src/test/java/swaydb/java/QueueTest.java +++ b/swaydb-java/src/test/java/swaydb/java/QueueTest.java @@ -17,7 +17,6 @@ package swaydb.java; import org.junit.jupiter.api.Test; -import swaydb.java.TestBase; import swaydb.java.serializers.Serializer; import java.io.IOException; diff --git a/swaydb-java/src/test/java/swaydb/java/SetTest.java b/swaydb-java/src/test/java/swaydb/java/SetTest.java index 4cc41fa86..e6c81db3d 100644 --- a/swaydb-java/src/test/java/swaydb/java/SetTest.java +++ b/swaydb-java/src/test/java/swaydb/java/SetTest.java @@ -18,11 +18,12 @@ import org.junit.jupiter.api.Test; -import swaydb.*; -import swaydb.java.TestBase; +import swaydb.Apply; +import swaydb.Prepare; +import swaydb.PureFunction; +import swaydb.PureFunctionJava; import swaydb.java.memory.MemorySet; import swaydb.java.serializers.Serializer; -import swaydb.java.Pair; import java.io.IOException; import java.io.Serializable; diff --git a/swaydb-java/src/test/java/swaydb/java/table/domain/table/key/KeySerializer.java b/swaydb-java/src/test/java/swaydb/java/table/domain/table/key/KeySerializer.java index f72d898d7..65100056f 100644 --- a/swaydb-java/src/test/java/swaydb/java/table/domain/table/key/KeySerializer.java +++ b/swaydb-java/src/test/java/swaydb/java/table/domain/table/key/KeySerializer.java @@ -16,10 +16,10 @@ package swaydb.java.table.domain.table.key; +import swaydb.java.serializers.Serializer; import swaydb.slice.Slice; import swaydb.slice.SliceReader; import swaydb.slice.utils.ByteOps; -import swaydb.java.serializers.Serializer; public class KeySerializer implements Serializer { diff --git a/swaydb-java/src/test/java/swaydb/java/table/domain/table/mapKey/MapKeySerializer.java b/swaydb-java/src/test/java/swaydb/java/table/domain/table/mapKey/MapKeySerializer.java index 649316837..3e274b265 100644 --- a/swaydb-java/src/test/java/swaydb/java/table/domain/table/mapKey/MapKeySerializer.java +++ b/swaydb-java/src/test/java/swaydb/java/table/domain/table/mapKey/MapKeySerializer.java @@ -16,8 +16,8 @@ package swaydb.java.table.domain.table.mapKey; -import swaydb.slice.Slice; import swaydb.java.serializers.Serializer; +import swaydb.slice.Slice; /** * Serializes MapKey. diff --git a/swaydb-java/src/test/java/swaydb/java/table/domain/table/value/ValueSerializer.java b/swaydb-java/src/test/java/swaydb/java/table/domain/table/value/ValueSerializer.java index 4926c186d..db0077814 100644 --- a/swaydb-java/src/test/java/swaydb/java/table/domain/table/value/ValueSerializer.java +++ b/swaydb-java/src/test/java/swaydb/java/table/domain/table/value/ValueSerializer.java @@ -16,10 +16,10 @@ package swaydb.java.table.domain.table.value; +import swaydb.java.serializers.Serializer; import swaydb.slice.Slice; import swaydb.slice.SliceReader; import swaydb.slice.utils.ByteOps; -import swaydb.java.serializers.Serializer; public class ValueSerializer implements Serializer { diff --git a/swaydb-java/src/test/scala/swaydb/java/JavaTest.scala b/swaydb-java/src/test/scala/swaydb/java/JavaTest.scala index 801f48c32..26e1a8c6d 100644 --- a/swaydb-java/src/test/scala/swaydb/java/JavaTest.scala +++ b/swaydb-java/src/test/scala/swaydb/java/JavaTest.scala @@ -18,7 +18,6 @@ package swaydb.java import org.scalatest.OptionValues._ import org.scalatest.matchers.should.Matchers._ -import swaydb.java.JavaEventually._ import swaydb.utils.Java._ import java.util.Optional diff --git a/swaydb/src/main/scala/swaydb/CommonConfigs.scala b/swaydb/src/main/scala/swaydb/CommonConfigs.scala index 8895a8b9a..ecdeab533 100644 --- a/swaydb/src/main/scala/swaydb/CommonConfigs.scala +++ b/swaydb/src/main/scala/swaydb/CommonConfigs.scala @@ -16,9 +16,9 @@ package swaydb -import swaydb.configs.level.DefaultExecutionContext import swaydb.config.compaction.{CompactionConfig, PushStrategy} import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.configs.level.DefaultExecutionContext import scala.concurrent.duration._ diff --git a/swaydb/src/main/scala/swaydb/KeyOrderConverter.scala b/swaydb/src/main/scala/swaydb/KeyOrderConverter.scala index 148c100c0..5dd6834cf 100644 --- a/swaydb/src/main/scala/swaydb/KeyOrderConverter.scala +++ b/swaydb/src/main/scala/swaydb/KeyOrderConverter.scala @@ -16,10 +16,10 @@ package swaydb -import swaydb.utils.Eithers -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers protected object KeyOrderConverter { diff --git a/swaydb/src/main/scala/swaydb/MapT.scala b/swaydb/src/main/scala/swaydb/MapT.scala index dfc876ad6..6f3b2197e 100644 --- a/swaydb/src/main/scala/swaydb/MapT.scala +++ b/swaydb/src/main/scala/swaydb/MapT.scala @@ -16,8 +16,6 @@ package swaydb -import swaydb.OK - import scala.collection.compat.IterableOnce import scala.concurrent.duration.{Deadline, FiniteDuration} diff --git a/swaydb/src/main/scala/swaydb/MultiMap.scala b/swaydb/src/main/scala/swaydb/MultiMap.scala index 9a9824416..a0700eabe 100644 --- a/swaydb/src/main/scala/swaydb/MultiMap.scala +++ b/swaydb/src/main/scala/swaydb/MultiMap.scala @@ -16,16 +16,15 @@ package swaydb +import swaydb.config.accelerate.LevelZeroMeter +import swaydb.config.compaction.LevelMeter import swaydb.core.file.ForceSaveApplier -import swaydb.core.log.counter.CounterLog import swaydb.core.file.sweeper.ByteBufferSweeper.ByteBufferSweeperActor +import swaydb.core.log.counter.CounterLog import swaydb.core.util.Times._ -import swaydb.config.accelerate.LevelZeroMeter -import swaydb.config.compaction.LevelMeter -import swaydb.OK -import swaydb.slice.Slice import swaydb.multimap.{MultiKey, MultiPrepare, MultiValue, Schema} import swaydb.serializers.{Serializer, _} +import swaydb.slice.Slice import swaydb.stream.{From, SourceFree, StreamFree} import java.nio.file.Path diff --git a/swaydb/src/main/scala/swaydb/PrepareImplicits.scala b/swaydb/src/main/scala/swaydb/PrepareImplicits.scala index 99dd51045..ee9d579a4 100644 --- a/swaydb/src/main/scala/swaydb/PrepareImplicits.scala +++ b/swaydb/src/main/scala/swaydb/PrepareImplicits.scala @@ -16,8 +16,8 @@ package swaydb -import swaydb.slice.{Slice, SliceOption} import swaydb.serializers._ +import swaydb.slice.{Slice, SliceOption} import scala.collection.compat.IterableOnce diff --git a/swaydb/src/main/scala/swaydb/Queue.scala b/swaydb/src/main/scala/swaydb/Queue.scala index 8ceb2197e..0bfab5b5b 100644 --- a/swaydb/src/main/scala/swaydb/Queue.scala +++ b/swaydb/src/main/scala/swaydb/Queue.scala @@ -17,13 +17,12 @@ package swaydb import com.typesafe.scalalogging.LazyLogging -import swaydb.core.util.Bytes import swaydb.config.accelerate.LevelZeroMeter import swaydb.config.compaction.LevelMeter -import swaydb.OK -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.util.Bytes import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.stream.StreamFree import java.nio.file.Path diff --git a/swaydb/src/main/scala/swaydb/SetMap.scala b/swaydb/src/main/scala/swaydb/SetMap.scala index d8c3ee93e..10c7f6313 100644 --- a/swaydb/src/main/scala/swaydb/SetMap.scala +++ b/swaydb/src/main/scala/swaydb/SetMap.scala @@ -16,13 +16,12 @@ package swaydb -import swaydb.core.util.Bytes import swaydb.config.accelerate.LevelZeroMeter import swaydb.config.compaction.LevelMeter -import swaydb.OK -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice +import swaydb.core.util.Bytes import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.stream.{From, SourceFree} import java.nio.file.Path diff --git a/swaydb/src/main/scala/swaydb/eventually/persistent/DefaultConfigs.scala b/swaydb/src/main/scala/swaydb/eventually/persistent/DefaultConfigs.scala index 7ae6f1fb0..11c72ba8b 100644 --- a/swaydb/src/main/scala/swaydb/eventually/persistent/DefaultConfigs.scala +++ b/swaydb/src/main/scala/swaydb/eventually/persistent/DefaultConfigs.scala @@ -16,9 +16,9 @@ package swaydb.eventually.persistent -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.MemoryCache.ByteCacheOnly import swaydb.config._ +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.effect.{IOAction, IOStrategy} import swaydb.utils.StorageUnits._ import swaydb.{ActorConfig, CommonConfigs} diff --git a/swaydb/src/main/scala/swaydb/eventually/persistent/Map.scala b/swaydb/src/main/scala/swaydb/eventually/persistent/Map.scala index e9033e562..6dd4362b1 100644 --- a/swaydb/src/main/scala/swaydb/eventually/persistent/Map.scala +++ b/swaydb/src/main/scala/swaydb/eventually/persistent/Map.scala @@ -17,20 +17,18 @@ package swaydb.eventually.persistent import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.{DefaultEventuallyPersistentConfig, DefaultExecutionContext} -import swaydb.core.Core -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig -import swaydb.config._ -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.{DefaultEventuallyPersistentConfig, DefaultExecutionContext} +import swaydb.core.Core +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.function.FunctionConverter import swaydb.serializers.Serializer -import swaydb.config.Functions +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.StorageUnits._ import swaydb.{Apply, CommonConfigs, KeyOrderConverter, PureFunction} diff --git a/swaydb/src/main/scala/swaydb/eventually/persistent/MultiMap.scala b/swaydb/src/main/scala/swaydb/eventually/persistent/MultiMap.scala index bfbc62e30..788d5166b 100644 --- a/swaydb/src/main/scala/swaydb/eventually/persistent/MultiMap.scala +++ b/swaydb/src/main/scala/swaydb/eventually/persistent/MultiMap.scala @@ -17,20 +17,18 @@ package swaydb.eventually.persistent import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.function.FunctionConverter import swaydb.multimap.{MultiKey, MultiValue} import swaydb.serializers.Serializer -import swaydb.config.Functions +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ import swaydb.{Apply, CommonConfigs, KeyOrderConverter, MultiMap, PureFunction} diff --git a/swaydb/src/main/scala/swaydb/eventually/persistent/Queue.scala b/swaydb/src/main/scala/swaydb/eventually/persistent/Queue.scala index 69b12e7fa..8f0ca9c73 100644 --- a/swaydb/src/main/scala/swaydb/eventually/persistent/Queue.scala +++ b/swaydb/src/main/scala/swaydb/eventually/persistent/Queue.scala @@ -17,17 +17,16 @@ package swaydb.eventually.persistent import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ import swaydb.{Bag, CommonConfigs} diff --git a/swaydb/src/main/scala/swaydb/eventually/persistent/Set.scala b/swaydb/src/main/scala/swaydb/eventually/persistent/Set.scala index 1aad2405f..2a722c507 100644 --- a/swaydb/src/main/scala/swaydb/eventually/persistent/Set.scala +++ b/swaydb/src/main/scala/swaydb/eventually/persistent/Set.scala @@ -17,20 +17,19 @@ package swaydb.eventually.persistent import com.typesafe.scalalogging.LazyLogging +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} +import swaydb.config.compaction.CompactionConfig +import swaydb.config.sequencer.Sequencer +import swaydb.config._ import swaydb.configs.level.{DefaultEventuallyPersistentConfig, DefaultExecutionContext} import swaydb.core.Core import swaydb.core.build.BuildValidator import swaydb.core.segment.FunctionStore -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.compaction.CompactionConfig -import swaydb.config._ -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} import swaydb.effect.Dir import swaydb.function.FunctionConverter import swaydb.serializers.{Default, Serializer} +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.StorageUnits._ import swaydb.{Apply, CommonConfigs, KeyOrderConverter, PureFunction} diff --git a/swaydb/src/main/scala/swaydb/eventually/persistent/SetMap.scala b/swaydb/src/main/scala/swaydb/eventually/persistent/SetMap.scala index 4fa2e1324..dae0e40ae 100644 --- a/swaydb/src/main/scala/swaydb/eventually/persistent/SetMap.scala +++ b/swaydb/src/main/scala/swaydb/eventually/persistent/SetMap.scala @@ -18,18 +18,17 @@ package swaydb.eventually.persistent import com.typesafe.scalalogging.LazyLogging import swaydb.CommonConfigs -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.build.BuildValidator -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.CompactionConfig -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.StorageUnits._ import java.nio.file.Path diff --git a/swaydb/src/main/scala/swaydb/memory/DefaultConfigs.scala b/swaydb/src/main/scala/swaydb/memory/DefaultConfigs.scala index b6a094970..82de3205f 100644 --- a/swaydb/src/main/scala/swaydb/memory/DefaultConfigs.scala +++ b/swaydb/src/main/scala/swaydb/memory/DefaultConfigs.scala @@ -17,9 +17,9 @@ package swaydb.memory import swaydb.ActorConfig +import swaydb.config.FileCache import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.FileCache import swaydb.utils.StorageUnits._ import scala.concurrent.ExecutionContext diff --git a/swaydb/src/main/scala/swaydb/memory/Map.scala b/swaydb/src/main/scala/swaydb/memory/Map.scala index e69822662..feb719efc 100644 --- a/swaydb/src/main/scala/swaydb/memory/Map.scala +++ b/swaydb/src/main/scala/swaydb/memory/Map.scala @@ -17,18 +17,17 @@ package swaydb.memory import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.{DefaultExecutionContext, DefaultMemoryConfig} -import swaydb.core.Core -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, MemoryCache, ThreadStateCache} -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.{DefaultExecutionContext, DefaultMemoryConfig} +import swaydb.core.Core +import swaydb.core.build.BuildValidator import swaydb.function.FunctionConverter import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.{Apply, CommonConfigs, KeyOrderConverter, PureFunction} import scala.concurrent.duration.FiniteDuration diff --git a/swaydb/src/main/scala/swaydb/memory/MultiMap.scala b/swaydb/src/main/scala/swaydb/memory/MultiMap.scala index deff02881..61c30ce6e 100644 --- a/swaydb/src/main/scala/swaydb/memory/MultiMap.scala +++ b/swaydb/src/main/scala/swaydb/memory/MultiMap.scala @@ -17,18 +17,17 @@ package swaydb.memory import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.log.counter.CounterLog import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.log.counter.CounterLog import swaydb.function.FunctionConverter import swaydb.multimap.{MultiKey, MultiValue} import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.{Apply, CommonConfigs, KeyOrderConverter, MultiMap, PureFunction} import scala.concurrent.duration.FiniteDuration diff --git a/swaydb/src/main/scala/swaydb/memory/Queue.scala b/swaydb/src/main/scala/swaydb/memory/Queue.scala index 4600cfb53..8ebbc5690 100644 --- a/swaydb/src/main/scala/swaydb/memory/Queue.scala +++ b/swaydb/src/main/scala/swaydb/memory/Queue.scala @@ -17,15 +17,14 @@ package swaydb.memory import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.DefaultExecutionContext import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.{Bag, CommonConfigs} import scala.concurrent.duration.FiniteDuration diff --git a/swaydb/src/main/scala/swaydb/memory/Set.scala b/swaydb/src/main/scala/swaydb/memory/Set.scala index 9017af8ee..765e0f249 100644 --- a/swaydb/src/main/scala/swaydb/memory/Set.scala +++ b/swaydb/src/main/scala/swaydb/memory/Set.scala @@ -17,19 +17,18 @@ package swaydb.memory import com.typesafe.scalalogging.LazyLogging +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} +import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} +import swaydb.config.sequencer.Sequencer +import swaydb.config._ import swaydb.configs.level.{DefaultExecutionContext, DefaultMemoryConfig} import swaydb.core.Core import swaydb.core.build.BuildValidator import swaydb.core.segment.FunctionStore -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, MemoryCache, ThreadStateCache} -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} import swaydb.function.FunctionConverter import swaydb.serializers.{Default, Serializer} +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.{Apply, CommonConfigs, KeyOrderConverter, PureFunction} import scala.concurrent.duration.FiniteDuration diff --git a/swaydb/src/main/scala/swaydb/memory/SetMap.scala b/swaydb/src/main/scala/swaydb/memory/SetMap.scala index 1b35f29c7..f7d89883d 100644 --- a/swaydb/src/main/scala/swaydb/memory/SetMap.scala +++ b/swaydb/src/main/scala/swaydb/memory/SetMap.scala @@ -18,16 +18,15 @@ package swaydb.memory import com.typesafe.scalalogging.LazyLogging import swaydb.CommonConfigs -import swaydb.configs.level.DefaultExecutionContext -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config.{FileCache, ThreadStateCache} -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import scala.concurrent.duration.FiniteDuration import scala.reflect.ClassTag diff --git a/swaydb/src/main/scala/swaydb/multimap/MultiKey.scala b/swaydb/src/main/scala/swaydb/multimap/MultiKey.scala index ddb2f42d9..9a072aba7 100644 --- a/swaydb/src/main/scala/swaydb/multimap/MultiKey.scala +++ b/swaydb/src/main/scala/swaydb/multimap/MultiKey.scala @@ -18,9 +18,9 @@ package swaydb.multimap import swaydb.core.file.reader.Reader import swaydb.core.util.Bytes -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder private[swaydb] sealed trait MultiKey[+C, +K] { def childId: Long diff --git a/swaydb/src/main/scala/swaydb/multimap/MultiValue.scala b/swaydb/src/main/scala/swaydb/multimap/MultiValue.scala index 8b9608efb..8747daf32 100644 --- a/swaydb/src/main/scala/swaydb/multimap/MultiValue.scala +++ b/swaydb/src/main/scala/swaydb/multimap/MultiValue.scala @@ -17,8 +17,8 @@ package swaydb.multimap import swaydb.core.util.Bytes -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice private[swaydb] sealed trait MultiValue[+V] private[swaydb] object MultiValue { diff --git a/swaydb/src/main/scala/swaydb/persistent/DefaultConfigs.scala b/swaydb/src/main/scala/swaydb/persistent/DefaultConfigs.scala index ebc9e351e..f15028785 100644 --- a/swaydb/src/main/scala/swaydb/persistent/DefaultConfigs.scala +++ b/swaydb/src/main/scala/swaydb/persistent/DefaultConfigs.scala @@ -16,10 +16,10 @@ package swaydb.persistent -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.config.MemoryCache.ByteCacheOnly import swaydb.config._ +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} +import swaydb.config.compaction.{LevelMeter, LevelThrottle, LevelZeroThrottle} import swaydb.effect.{IOAction, IOStrategy} import swaydb.utils.OperatingSystem import swaydb.utils.StorageUnits._ diff --git a/swaydb/src/main/scala/swaydb/persistent/Map.scala b/swaydb/src/main/scala/swaydb/persistent/Map.scala index 769335aac..fffc1960f 100644 --- a/swaydb/src/main/scala/swaydb/persistent/Map.scala +++ b/swaydb/src/main/scala/swaydb/persistent/Map.scala @@ -17,19 +17,18 @@ package swaydb.persistent import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.{DefaultExecutionContext, DefaultPersistentConfig} -import swaydb.core.Core -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.{DefaultExecutionContext, DefaultPersistentConfig} +import swaydb.core.Core +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.function.FunctionConverter import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.StorageUnits._ import swaydb.{Apply, CommonConfigs, KeyOrderConverter, PureFunction} diff --git a/swaydb/src/main/scala/swaydb/persistent/MultiMap.scala b/swaydb/src/main/scala/swaydb/persistent/MultiMap.scala index 6716c1ae3..597fdaef9 100644 --- a/swaydb/src/main/scala/swaydb/persistent/MultiMap.scala +++ b/swaydb/src/main/scala/swaydb/persistent/MultiMap.scala @@ -17,19 +17,18 @@ package swaydb.persistent import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.function.FunctionConverter import swaydb.multimap.{MultiKey, MultiValue} import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ import swaydb.{Apply, CommonConfigs, KeyOrderConverter, MultiMap, PureFunction} diff --git a/swaydb/src/main/scala/swaydb/persistent/Queue.scala b/swaydb/src/main/scala/swaydb/persistent/Queue.scala index cbb897d37..ddd506d65 100644 --- a/swaydb/src/main/scala/swaydb/persistent/Queue.scala +++ b/swaydb/src/main/scala/swaydb/persistent/Queue.scala @@ -17,17 +17,16 @@ package swaydb.persistent import com.typesafe.scalalogging.LazyLogging -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.build.BuildValidator import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ import swaydb.{Bag, CommonConfigs} diff --git a/swaydb/src/main/scala/swaydb/persistent/Set.scala b/swaydb/src/main/scala/swaydb/persistent/Set.scala index 842ed011c..dc4af7176 100644 --- a/swaydb/src/main/scala/swaydb/persistent/Set.scala +++ b/swaydb/src/main/scala/swaydb/persistent/Set.scala @@ -17,20 +17,19 @@ package swaydb.persistent import com.typesafe.scalalogging.LazyLogging +import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} +import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} +import swaydb.config.sequencer.Sequencer +import swaydb.config._ import swaydb.configs.level.{DefaultExecutionContext, DefaultPersistentConfig} import swaydb.core.Core import swaydb.core.build.BuildValidator import swaydb.core.segment.FunctionStore -import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} -import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.{KeyOrder, TimeOrder} -import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} import swaydb.effect.Dir import swaydb.function.FunctionConverter import swaydb.serializers.{Default, Serializer} +import swaydb.slice.Slice +import swaydb.slice.order.{KeyOrder, TimeOrder} import swaydb.utils.StorageUnits._ import swaydb.{Apply, CommonConfigs, KeyOrderConverter, PureFunction} diff --git a/swaydb/src/main/scala/swaydb/persistent/SetMap.scala b/swaydb/src/main/scala/swaydb/persistent/SetMap.scala index bb7d0877d..bc6528172 100644 --- a/swaydb/src/main/scala/swaydb/persistent/SetMap.scala +++ b/swaydb/src/main/scala/swaydb/persistent/SetMap.scala @@ -18,18 +18,17 @@ package swaydb.persistent import com.typesafe.scalalogging.LazyLogging import swaydb.CommonConfigs -import swaydb.configs.level.DefaultExecutionContext -import swaydb.core.build.BuildValidator -import swaydb.utils.Eithers import swaydb.config.accelerate.{Accelerator, LevelZeroMeter} import swaydb.config.compaction.{CompactionConfig, LevelMeter, LevelThrottle, LevelZeroThrottle} -import swaydb.config._ -import swaydb.slice.order.KeyOrder import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice -import swaydb.config.{Atomic, DataType, Functions, OptimiseWrites} +import swaydb.config._ +import swaydb.configs.level.DefaultExecutionContext +import swaydb.core.build.BuildValidator import swaydb.effect.Dir import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder +import swaydb.utils.Eithers import swaydb.utils.StorageUnits._ import java.nio.file.Path diff --git a/swaydb/src/test/scala/swaydb/api/SwayDBAppliedFunctionsSpec.scala b/swaydb/src/test/scala/swaydb/api/SwayDBAppliedFunctionsSpec.scala index b1b7a3d96..69f0456ce 100644 --- a/swaydb/src/test/scala/swaydb/api/SwayDBAppliedFunctionsSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/SwayDBAppliedFunctionsSpec.scala @@ -17,14 +17,13 @@ package swaydb.api import swaydb.PureFunctionScala._ +import swaydb.config.Functions import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ import swaydb.core.log.applied.AppliedFunctionsLog -import swaydb.Benchmark -import swaydb.config.Functions import swaydb.serializers.Default._ import swaydb.testkit.RunThis.{eventual, runThis} -import swaydb.{Glass, _} +import swaydb.{Benchmark, Glass, _} import java.nio.file.Files import scala.concurrent.duration.DurationInt diff --git a/swaydb/src/test/scala/swaydb/api/SwayDBFunctionSpec.scala b/swaydb/src/test/scala/swaydb/api/SwayDBFunctionSpec.scala index 26ee518e3..b1c3987b8 100644 --- a/swaydb/src/test/scala/swaydb/api/SwayDBFunctionSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/SwayDBFunctionSpec.scala @@ -18,18 +18,17 @@ package swaydb.api import swaydb.IOValues._ import swaydb.PureFunctionScala._ +import swaydb.config.Functions import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ import swaydb.core.{TestBase, TestCaseSweeper} -import swaydb.config.Functions import swaydb.macros.Sealed import swaydb.serializers.Default._ import swaydb.serializers.Serializer import swaydb.testkit.RunThis._ import swaydb.{Apply, IO, Prepare, PureFunction, StorageByteImplicits} -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration.DurationInt sealed trait Key diff --git a/swaydb/src/test/scala/swaydb/api/SwayDBPartialSetSpec.scala b/swaydb/src/test/scala/swaydb/api/SwayDBPartialSetSpec.scala index 7f6bc2ad8..cf7751c06 100644 --- a/swaydb/src/test/scala/swaydb/api/SwayDBPartialSetSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/SwayDBPartialSetSpec.scala @@ -20,8 +20,8 @@ import org.scalatest.OptionValues._ import swaydb.Glass import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ -import swaydb.slice.order.KeyOrder import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ diff --git a/swaydb/src/test/scala/swaydb/api/SwayDBReverseSpec.scala b/swaydb/src/test/scala/swaydb/api/SwayDBReverseSpec.scala index c52828881..e69feb9de 100644 --- a/swaydb/src/test/scala/swaydb/api/SwayDBReverseSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/SwayDBReverseSpec.scala @@ -20,9 +20,9 @@ import swaydb.IOValues._ import swaydb._ import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ class SwayDBReverse_Persistent_Spec extends SwayDBReverseSpec { diff --git a/swaydb/src/test/scala/swaydb/api/SwayDBSequencerSpec.scala b/swaydb/src/test/scala/swaydb/api/SwayDBSequencerSpec.scala index f90dd9637..446684fda 100644 --- a/swaydb/src/test/scala/swaydb/api/SwayDBSequencerSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/SwayDBSequencerSpec.scala @@ -19,9 +19,9 @@ package swaydb.api import org.scalatest.OptionValues._ import swaydb.Bag.Implicits._ import swaydb._ +import swaydb.config.sequencer.Sequencer import swaydb.core.TestCaseSweeper._ import swaydb.core.{TestCaseSweeper, TestExecutionContext} -import swaydb.config.sequencer.Sequencer import swaydb.serializers.Default._ import swaydb.testkit.RunThis.FutureImplicits diff --git a/swaydb/src/test/scala/swaydb/api/SwayDBSpec.scala b/swaydb/src/test/scala/swaydb/api/SwayDBSpec.scala index 91d319c9c..e12ff3633 100644 --- a/swaydb/src/test/scala/swaydb/api/SwayDBSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/SwayDBSpec.scala @@ -20,9 +20,9 @@ import org.scalatest.OptionValues._ import swaydb.Exception.InvalidDirectoryType import swaydb.IOValues._ import swaydb._ +import swaydb.config.DataType import swaydb.core.TestCaseSweeper._ import swaydb.core.{Core, TestCaseSweeper} -import swaydb.config.DataType import swaydb.serializers.Default._ import swaydb.testkit.RunThis.runThis diff --git a/swaydb/src/test/scala/swaydb/api/TestBaseEmbedded.scala b/swaydb/src/test/scala/swaydb/api/TestBaseEmbedded.scala index 267f13d18..c905d28e1 100644 --- a/swaydb/src/test/scala/swaydb/api/TestBaseEmbedded.scala +++ b/swaydb/src/test/scala/swaydb/api/TestBaseEmbedded.scala @@ -21,11 +21,11 @@ import org.scalatest.exceptions.TestFailedException import swaydb.IO.ApiIO import swaydb.IOValues._ import swaydb._ +import swaydb.config.sequencer.Sequencer import swaydb.core.CommonAssertions.eitherOne import swaydb.core.{Core, TestBase, TestExecutionContext} -import swaydb.config.sequencer.Sequencer -import swaydb.slice.Slice import swaydb.multimap.{MultiKey, MultiValue} +import swaydb.slice.Slice import swaydb.testkit.RunThis._ import scala.annotation.tailrec diff --git a/swaydb/src/test/scala/swaydb/api/multimap/MultiKeySpec.scala b/swaydb/src/test/scala/swaydb/api/multimap/MultiKeySpec.scala index 37d02ce3f..2e3ef0f1b 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/MultiKeySpec.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/MultiKeySpec.scala @@ -19,11 +19,11 @@ package swaydb.api.multimap import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import swaydb.core.TestData._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.multimap.MultiKey import swaydb.serializers.Default._ import swaydb.serializers.Serializer +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import scala.collection.SortedSet import scala.util.{Random, Try} diff --git a/swaydb/src/test/scala/swaydb/api/multimap/MultiMapFunctionsSpec.scala b/swaydb/src/test/scala/swaydb/api/multimap/MultiMapFunctionsSpec.scala index c7666319c..8cfc01ceb 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/MultiMapFunctionsSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/MultiMapFunctionsSpec.scala @@ -19,12 +19,12 @@ package swaydb.api.multimap import org.scalatest.OptionValues._ import swaydb.PureFunctionScala._ import swaydb.api.TestBaseEmbedded +import swaydb.config.Functions import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ -import swaydb.config.Functions -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.serializers.Default._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.utils.StorageUnits._ import swaydb.{Apply, Bag, Glass, MultiMap, Prepare, PureFunction} diff --git a/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec.scala b/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec.scala index f4d830501..3f271e5c4 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec.scala @@ -22,10 +22,10 @@ import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ import swaydb.core.TestData._ -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.multimap.MultiPrepare import swaydb.serializers.Default._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ import swaydb.{Bag, Glass, IO, MultiMap, Prepare} diff --git a/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec_OLD.scala b/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec_OLD.scala index b953e4b3f..388424a58 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec_OLD.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/MultiMapSpec_OLD.scala @@ -21,10 +21,10 @@ import swaydb.api.TestBaseEmbedded import swaydb.core.CommonAssertions._ import swaydb.core.TestCaseSweeper._ import swaydb.core.{TestCaseSweeper, TestExecutionContext} -import swaydb.slice.order.KeyOrder -import swaydb.slice.Slice import swaydb.multimap.{MultiKey, MultiValue} import swaydb.serializers.Default._ +import swaydb.slice.Slice +import swaydb.slice.order.KeyOrder import swaydb.testkit.RunThis._ import swaydb.utils.StorageUnits._ import swaydb.{Bag, Glass, MultiMap, Prepare} diff --git a/swaydb/src/test/scala/swaydb/api/multimap/NestedOptionValueSpec.scala b/swaydb/src/test/scala/swaydb/api/multimap/NestedOptionValueSpec.scala index 2529e133c..be50ea652 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/NestedOptionValueSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/NestedOptionValueSpec.scala @@ -20,8 +20,8 @@ import org.scalatest.OptionValues._ import swaydb.api.TestBaseEmbedded import swaydb.core.TestCaseSweeper import swaydb.core.TestCaseSweeper._ -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice import swaydb.{Bag, Glass} class NestedOptionValueSpec extends TestBaseEmbedded { diff --git a/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/PrimaryKey.scala b/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/PrimaryKey.scala index 48b32112d..c1c9ed641 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/PrimaryKey.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/PrimaryKey.scala @@ -17,8 +17,8 @@ package swaydb.api.multimap.multiprepare import boopickle.Default.{Pickle, Unpickle, _} -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice /** * All Primary Keys for [[Table]]s. diff --git a/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Row.scala b/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Row.scala index 5c6f42d94..cc567d273 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Row.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Row.scala @@ -17,8 +17,8 @@ package swaydb.api.multimap.multiprepare import boopickle.Default.{Pickle, Unpickle, _} -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice /** * All row types for [[Table]] diff --git a/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Table.scala b/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Table.scala index 5294ee4b2..262811c69 100644 --- a/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Table.scala +++ b/swaydb/src/test/scala/swaydb/api/multimap/multiprepare/Table.scala @@ -17,8 +17,8 @@ package swaydb.api.multimap.multiprepare import boopickle.Default.{Pickle, Unpickle, _} -import swaydb.slice.Slice import swaydb.serializers.Serializer +import swaydb.slice.Slice /** * All Tables for [[MultiMapMultiPrepareSpec]]. diff --git a/swaydb/src/test/scala/swaydb/api/queue/QueueSpec.scala b/swaydb/src/test/scala/swaydb/api/queue/QueueSpec.scala index 78638453c..39d2bbb60 100644 --- a/swaydb/src/test/scala/swaydb/api/queue/QueueSpec.scala +++ b/swaydb/src/test/scala/swaydb/api/queue/QueueSpec.scala @@ -18,13 +18,11 @@ package swaydb.api.queue import org.scalatest.OptionValues._ import swaydb.core.TestCaseSweeper._ -import swaydb.Benchmark import swaydb.core.{TestBase, TestCaseSweeper} import swaydb.serializers.Default._ -import swaydb.{Glass, Queue} +import swaydb.{Benchmark, Glass, Queue} import java.util.concurrent.ConcurrentLinkedQueue -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import scala.util.Random diff --git a/testkit/src/main/scala/swaydb/testkit/RunThis.scala b/testkit/src/main/scala/swaydb/testkit/RunThis.scala index 4af3c414c..2cca178ab 100644 --- a/testkit/src/main/scala/swaydb/testkit/RunThis.scala +++ b/testkit/src/main/scala/swaydb/testkit/RunThis.scala @@ -18,7 +18,6 @@ package swaydb.testkit import org.scalatest.concurrent.Eventually -import scala.collection.parallel.CollectionConverters._ import scala.concurrent.duration.{Deadline, FiniteDuration, _} import scala.concurrent.{Await, ExecutionContext, Future} import scala.util.Random diff --git a/tools/src/main/scala/swaydb/tools/RepairAppendix.scala b/tools/src/main/scala/swaydb/tools/RepairAppendix.scala index d79e9f689..28f34b49c 100644 --- a/tools/src/main/scala/swaydb/tools/RepairAppendix.scala +++ b/tools/src/main/scala/swaydb/tools/RepairAppendix.scala @@ -6,8 +6,8 @@ import swaydb.config.repairAppendix.{AppendixRepairStrategy, OverlappingSegments import swaydb.core.file.sweeper.FileSweeper import swaydb.core.tool.AppendixRepairer import swaydb.serializers.Serializer -import swaydb.slice.{MaxKey, Slice} import swaydb.slice.order.KeyOrder +import swaydb.slice.{MaxKey, Slice} import java.nio.file.Path diff --git a/utils/src/main/scala/swaydb/utils/Aggregator.scala b/utils/src/main/scala/swaydb/utils/Aggregator.scala index d6f16bc83..2ab32c824 100644 --- a/utils/src/main/scala/swaydb/utils/Aggregator.scala +++ b/utils/src/main/scala/swaydb/utils/Aggregator.scala @@ -61,11 +61,11 @@ case object Aggregator { () => Aggregator.listBuffer[A] -// def slice[A: ClassTag]() = -// new CreatorSizeable[A, Slice[A]] { -// override def createNewSizeHint(size: Int): Aggregator[A, Slice[A]] = -// Slice.newAggregator(size) -// } + // def slice[A: ClassTag]() = + // new CreatorSizeable[A, Slice[A]] { + // override def createNewSizeHint(size: Int): Aggregator[A, Slice[A]] = + // Slice.newAggregator(size) + // } /** * Nothing disables inserting and adding elements the [[Aggregator]].