diff --git a/pom.xml b/pom.xml index a2c7493..b159f26 100644 --- a/pom.xml +++ b/pom.xml @@ -147,7 +147,7 @@ io.swaydb java_2.13 - 0.14.6 + 0.14.7 ch.qos.logback diff --git a/src/main/kotlin/functions/LikesTest.kt b/src/main/kotlin/functions/LikesTest.kt index c7b8415..36e875e 100644 --- a/src/main/kotlin/functions/LikesTest.kt +++ b/src/main/kotlin/functions/LikesTest.kt @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import swaydb.java.PureFunction import swaydb.java.Return -import swaydb.java.memory.MapConfig +import swaydb.java.memory.MemoryMap import swaydb.java.serializers.Default import java.util.stream.IntStream @@ -20,7 +20,8 @@ internal class LikesTest { } val likesMap = - MapConfig.functionsOn(Default.stringSerializer(), Default.intSerializer()) + MemoryMap + .functionsOn(Default.stringSerializer(), Default.intSerializer()) .registerFunction(incrementLikesFunction) .get() diff --git a/src/main/kotlin/ordering/ReverseOrderingTest.kt b/src/main/kotlin/ordering/ReverseOrderingTest.kt index 052979f..f7a5921 100644 --- a/src/main/kotlin/ordering/ReverseOrderingTest.kt +++ b/src/main/kotlin/ordering/ReverseOrderingTest.kt @@ -2,7 +2,7 @@ package ordering import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test -import swaydb.java.memory.MapConfig +import swaydb.java.memory.MemoryMap import swaydb.java.serializers.Default internal class ReverseOrderingTest { @@ -10,7 +10,8 @@ internal class ReverseOrderingTest { @Test fun reverse() { val map = - MapConfig.functionsOff(Default.intSerializer(), Default.intSerializer()) //provide a typed comparator that reverses ordering + MemoryMap + .functionsOff(Default.intSerializer(), Default.intSerializer()) //provide a typed comparator that reverses ordering .setTypedComparator { key1: Int, key2: Int? -> key1.compareTo(key2!!) * -1 } .get() @@ -30,4 +31,4 @@ internal class ReverseOrderingTest { assertEquals(expected, actual) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/queue/QueueTest.kt b/src/main/kotlin/queue/QueueTest.kt index f800ab8..7b335f7 100644 --- a/src/main/kotlin/queue/QueueTest.kt +++ b/src/main/kotlin/queue/QueueTest.kt @@ -2,7 +2,7 @@ package queue import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test -import swaydb.java.memory.QueueConfig +import swaydb.java.memory.MemoryQueue import swaydb.java.serializers.Default import java.time.Duration @@ -11,7 +11,8 @@ internal class QueueTest { @Test fun quickStart() { val queue = - QueueConfig.config(Default.intSerializer()) + MemoryQueue + .config(Default.intSerializer()) .get() queue.push(1) diff --git a/src/main/kotlin/quickstart/QuickStartMapFunctions.kt b/src/main/kotlin/quickstart/QuickStartMapFunctions.kt index faf688f..ccb068c 100644 --- a/src/main/kotlin/quickstart/QuickStartMapFunctions.kt +++ b/src/main/kotlin/quickstart/QuickStartMapFunctions.kt @@ -5,7 +5,7 @@ import swaydb.java.Deadline import swaydb.java.PureFunction import swaydb.java.Return import swaydb.java.Stream -import swaydb.java.memory.MapConfig +import swaydb.java.memory.MemoryMap import swaydb.java.serializers.Default.intSerializer import java.time.Duration import java.util.* @@ -26,10 +26,11 @@ internal object QuickStartMapFunctions { } } - val map = MapConfig - .functionsOn(intSerializer(), intSerializer()) - .registerFunction(function) - .get() + val map = + MemoryMap + .functionsOn(intSerializer(), intSerializer()) + .registerFunction(function) + .get() map.put(1, 1) //basic put map[1].get() //basic get @@ -42,8 +43,8 @@ internal object QuickStartMapFunctions { //Create a stream that updates all values within range 10 to 90. val updatedKeyValues = map - .from(10) .stream() + .from(10) .takeWhile { it.key() <= 90 } .map { KeyVal.create(it.key(), it.value() + 5000000) } diff --git a/src/main/kotlin/quickstart/QuickStartMapSimple.kt b/src/main/kotlin/quickstart/QuickStartMapSimple.kt index 08caf4e..11685d6 100644 --- a/src/main/kotlin/quickstart/QuickStartMapSimple.kt +++ b/src/main/kotlin/quickstart/QuickStartMapSimple.kt @@ -2,7 +2,7 @@ package quickstart import swaydb.KeyVal import swaydb.java.Stream -import swaydb.java.memory.MapConfig +import swaydb.java.memory.MemoryMap import swaydb.java.serializers.Default.intSerializer import java.time.Duration @@ -11,7 +11,7 @@ internal object QuickStartMapSimple { @JvmStatic fun main(args: Array) { val map = - MapConfig + MemoryMap .functionsOff(intSerializer(), intSerializer()) .get() @@ -26,8 +26,8 @@ internal object QuickStartMapSimple { //Create a stream that updates all values within range 10 to 90. val updatedKeyValues = map - .from(10) .stream() + .from(10) .takeWhile { it.key() <= 90 } .map { KeyVal.create(it.key(), it.value() + 5000000) } diff --git a/src/main/kotlin/quickstart/QuickStartQueue.kt b/src/main/kotlin/quickstart/QuickStartQueue.kt index 9132d65..79eea10 100644 --- a/src/main/kotlin/quickstart/QuickStartQueue.kt +++ b/src/main/kotlin/quickstart/QuickStartQueue.kt @@ -1,6 +1,6 @@ package quickstart -import swaydb.java.memory.QueueConfig +import swaydb.java.memory.MemoryQueue import swaydb.java.serializers.Default import java.time.Duration @@ -8,8 +8,10 @@ object QuickStartQueue { @JvmStatic fun main(args: Array) { - val queue = QueueConfig.config(Default.intSerializer()) - .get() + val queue = + MemoryQueue + .config(Default.intSerializer()) + .get() queue.push(1) queue.push(2, Duration.ofSeconds(0))