Skip to content

Commit

Permalink
splitting core packages to dedicated modules
Browse files Browse the repository at this point in the history
  • Loading branch information
simerplaha committed Nov 17, 2021
1 parent 068e3e3 commit 1bac172
Show file tree
Hide file tree
Showing 52 changed files with 66 additions and 66 deletions.
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ lazy val core =
`core-interop`,
effect,
utils,
queue,
`core-queue`,
slice,
cache,
actor,
compression,
skiplist,
`core-skiplist`,
testkit % Test,
macros % "test->test;compile-internal",
compression % Test,
Expand All @@ -221,20 +221,20 @@ lazy val `core-interop` =
testkit % Test
)

lazy val skiplist =
lazy val `core-skiplist` =
project
.settings(commonSettings)
.settings(publishSettings)
.settings(libraryDependencies ++= commonDependencies(scalaVersion.value))
.dependsOn(
series,
`core-series`,
effect,
slice,
testkit % Test,
serializers % Test
)

lazy val series =
lazy val `core-series` =
project
.settings(commonSettings)
.settings(publishSettings)
Expand All @@ -244,7 +244,7 @@ lazy val series =
serializers % Test
)

lazy val queue =
lazy val `core-queue` =
project
.settings(commonSettings)
.settings(publishSettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.queue
package swaydb.core.queue

protected sealed trait Node[+A] {
def isEmpty: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.queue
package swaydb.core.queue

import swaydb.utils.DropIterator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.queue
package swaydb.core.queue

import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

private[swaydb] trait Series[T] extends Iterable[T] {
def getOrNull(index: Int): T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

import java.util.concurrent.atomic.AtomicReferenceArray

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

import scala.reflect.ClassTag

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

object SeriesVolatile {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

final private class VolatileValue[T](@volatile var value: T)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.series.appendable
package swaydb.core.series.appendable

trait SeriesAppendable[T >: Null] {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package swaydb.series.appendable
package swaydb.core.series.appendable

import swaydb.series.VolatileValue
import swaydb.core.series.VolatileValue

private[series] object SeriesAppendableVolatile {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package swaydb.series.growable
package swaydb.core.series.growable

import swaydb.series.appendable.SeriesAppendableVolatile
import swaydb.core.series.appendable.SeriesAppendableVolatile

import scala.reflect.ClassTag

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package swaydb.series.map
package swaydb.core.series.map

import swaydb.series._
import swaydb.core.series._

import java.util.concurrent.atomic.AtomicInteger
import scala.annotation.tailrec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import swaydb.series.appendable.{SeriesAppendable, SeriesAppendableVolatile}
import swaydb.core.series.appendable.{SeriesAppendable, SeriesAppendableVolatile}

import scala.reflect.ClassTag

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

package swaydb.series
package swaydb.core.series

import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import swaydb.series.growable.SeriesGrowableList
import swaydb.core.series.growable.SeriesGrowableList

import scala.collection.mutable.ListBuffer
import scala.reflect.ClassTag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.series.map
package swaydb.core.series.map

import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package swaydb.series.map
package swaydb.core.series.map

import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package swaydb.skiplist
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.skiplist.AtomicRanges.{Action, Value}
import swaydb.core.skiplist.AtomicRanges.{Action, Value}
import swaydb.slice.Slice

import java.util.concurrent.ConcurrentSkipListMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import swaydb.Bag
import swaydb.slice.order.KeyOrder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

trait SkipListBatchable[OK, OV, K <: OK, V <: OV] extends SkipList[OK, OV, K, V] {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import swaydb.slice.order.KeyOrder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import swaydb.slice.order.KeyOrder
import swaydb.slice.Slice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import swaydb.utils.NullOps
import swaydb.slice.order.KeyOrder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import com.typesafe.scalalogging.LazyLogging
import swaydb.series.growable.SeriesGrowableList
import swaydb.core.series.growable.SeriesGrowableList
import swaydb.slice.Slice
import swaydb.slice.order.KeyOrder
import swaydb.utils.{English, WhenOccurs}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import swaydb.slice.order.KeyOrder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package swaydb.skiplist
package swaydb.core.skiplist

import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/swaydb/core/level/AppendixLogCache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package swaydb.core.level
import swaydb.Glass
import swaydb.core.log.{LogCache, LogCacheBuilder, LogEntry}
import swaydb.core.segment.{Segment, SegmentOption}
import swaydb.skiplist.SkipListConcurrent
import swaydb.core.skiplist.SkipListConcurrent
import swaydb.slice.order.KeyOrder
import swaydb.slice.{Slice, SliceOption}

Expand All @@ -41,7 +41,7 @@ object AppendixLogCache {

/**
* In history of this file's commit at revision "992965da26cba711c7b42a9a555d04de46b9fa37 - backup atomicSkipList for AppendixMapCache"
* uses [[swaydb.skiplist.SkipList.atomicRead]] and [[swaydb.skiplist.SkipList.atomicRead]] but
* uses [[swaydb.core.skiplist.SkipList.atomicRead]] and [[swaydb.core.skiplist.SkipList.atomicRead]] but
* for Appendix file batch is more efficient because millions of concurrent reads will require concurrent writes to the atomic SkipList
* whereas batch only requires a single copy of the SkipList which is more efficient.
*/
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/swaydb/core/level/zero/LevelZero.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import swaydb.core.sweeper.FileSweeper
import swaydb.core.util.MinMax
import swaydb.core.{CoreState, MemoryPathGenerator}
import swaydb.effect.{Effect, FileLocker}
import swaydb.skiplist.SkipList
import swaydb.core.skiplist.SkipList
import swaydb.slice.order.{KeyOrder, TimeOrder}
import swaydb.slice.{Slice, SliceOption}
import swaydb.utils.{DropIterator, Options}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import swaydb.core.data.{Memory, MemoryOption}
import swaydb.core.function.FunctionStore
import swaydb.core.log.{LogCache, LogCacheBuilder, LogEntry}
import swaydb.config.{Atomic, OptimiseWrites}
import swaydb.skiplist.{SkipList, SkipListConcurrent, SkipListSeries}
import swaydb.core.skiplist.{SkipList, SkipListConcurrent, SkipListSeries}
import swaydb.slice.order.{KeyOrder, TimeOrder}
import swaydb.slice.{MaxKey, MaxKeyOption, Slice, SliceOption}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/swaydb/core/log/LogCache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait LogCache[K, V] {
def isEmpty: Boolean

/**
* Max and not exact but [[swaydb.skiplist.SkipListSeries]] could've nulled key-values.
* Max and not exact but [[swaydb.core.skiplist.SkipListSeries]] could've nulled key-values.
*/
def maxKeyValueCount: Int

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/swaydb/core/log/LogEntry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import swaydb.core.data.Memory
import swaydb.core.log.LogEntry.{Put, Remove}
import swaydb.core.log.serializer.{LogEntrySerialiser, LogEntryWriter}
import swaydb.core.segment.Segment
import swaydb.skiplist.{SkipList, SkipListBatchable, SkipListConcurrent}
import swaydb.core.skiplist.{SkipList, SkipListBatchable, SkipListConcurrent}
import swaydb.slice.order.KeyOrder
import swaydb.slice.{Slice, SliceMut}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/swaydb/core/log/Logs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import swaydb.core.log.timer.Timer
import swaydb.core.sweeper.ByteBufferSweeper.ByteBufferSweeperActor
import swaydb.core.sweeper.FileSweeper
import swaydb.utils.DropIterator
import swaydb.queue.VolatileQueue
import swaydb.core.queue.VolatileQueue
import swaydb.config.accelerate.{Accelerator, LevelZeroMeter}
import swaydb.config.{MMAP, RecoveryMode}
import swaydb.slice.order.KeyOrder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package swaydb.core.log.applied

import swaydb.core.log.{LogCache, LogCacheBuilder, LogEntry}
import swaydb.skiplist.SkipListConcurrent
import swaydb.core.skiplist.SkipListConcurrent
import swaydb.slice.order.KeyOrder
import swaydb.slice.{Slice, SliceOption}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import swaydb.core.segment.defrag.DefragMemorySegment
import swaydb.core.segment.ref.search.ThreadReadState
import swaydb.core.sweeper.FileSweeper
import swaydb.core.util._
import swaydb.skiplist.SkipListTreeMap
import swaydb.core.skiplist.SkipListTreeMap
import swaydb.slice.MaxKey
import swaydb.config.compaction.CompactionConfig.CompactionParallelism
import swaydb.slice.order.{KeyOrder, TimeOrder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import swaydb.core.segment.ref.{SegmentRef, SegmentRefOption, SegmentRefReader}
import swaydb.core.sweeper.ByteBufferSweeper.ByteBufferSweeperActor
import swaydb.core.sweeper.{FileSweeper, MemorySweeper}
import swaydb.core.util._
import swaydb.skiplist.SkipListTreeMap
import swaydb.core.skiplist.SkipListTreeMap
import swaydb.slice.MaxKey
import swaydb.config.compaction.CompactionConfig.CompactionParallelism
import swaydb.config.{MMAP, SegmentRefCacheLife}
Expand Down
Loading

0 comments on commit 1bac172

Please sign in to comment.