DATAREDIS-1037 - Remove @ExperimentalCoroutinesApi annotations.

Original pull request: #480.
This commit is contained in:
Sebastien Deleuze
2019-09-27 19:18:52 +02:00
committed by Mark Paluch
parent 0bef525a79
commit f191b71583
14 changed files with 1 additions and 120 deletions

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitFirstOrNull
@@ -71,7 +70,6 @@ suspend fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.addAndAwait(key: K, l
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.add(key: K, locations: Flow<Collection<GeoLocation<M>>>): Flow<Long> =
add(key, locations.asFlux()).asFlow()
@@ -138,7 +136,6 @@ suspend fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.positionAndAwait(key:
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.radiusAsFlow(key: K, within: Circle, args: GeoRadiusCommandArgs? = null): Flow<GeoResult<GeoLocation<M>>> =
(if (args != null) radius(key, within, args) else radius(key, within)).asFlow()
@@ -149,7 +146,6 @@ fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.radiusAsFlow(key: K, within:
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.radiusAsFlow(key: K, member: M, radius: Double): Flow<GeoResult<GeoLocation<M>>> =
radius(key, member, radius).asFlow()
@@ -159,7 +155,6 @@ fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.radiusAsFlow(key: K, member:
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, M : Any> ReactiveGeoOperations<K, M>.radiusAsFlow(key: K, member: M, distance: Distance, args: GeoRadiusCommandArgs? = null): Flow<GeoResult<GeoLocation<M>>> =
(if (args != null) radius(key, member, distance, args) else radius(key, member, distance)).asFlow()

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitFirstOrNull
@@ -64,7 +63,7 @@ suspend fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.incr
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.keysAsFlow(key: H): Flow<HK> =
keys(key).asFlow()
@@ -119,7 +118,6 @@ suspend fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.putI
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.valuesAsFlow(key: H): Flow<HV> =
values(key).asFlow()
@@ -129,7 +127,6 @@ fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.valuesAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.entriesAsFlow(key: H): Flow<Map.Entry<HK, HV>> =
entries(key).asFlow()
@@ -139,7 +136,6 @@ fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.entriesAsFlo
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <H : Any, HK : Any, HV : Any> ReactiveHashOperations<H, HK, HV>.scanAsFlow(key: H, options: ScanOptions = ScanOptions.NONE): Flow<Map.Entry<HK, HV>> =
scan(key, options).asFlow()

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitFirstOrNull
@@ -28,7 +27,6 @@ import java.time.Duration
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveListOperations<K, V>.rangeAsFlow(key: K, start: Long, end: Long): Flow<V> =
range(key, start, end).asFlow()

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.asPublisher
@@ -37,7 +36,6 @@ import java.time.Instant
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any, T : Any> ReactiveRedisOperations<K, V>.executeAsFlow(action: (ReactiveRedisConnection) -> Flow<T>): Flow<T> =
execute { action(it).asPublisher() }.asFlow()
@@ -47,7 +45,6 @@ fun <K : Any, V : Any, T : Any> ReactiveRedisOperations<K, V>.executeAsFlow(acti
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any, T : Any> ReactiveRedisOperations<K, V>.executeAsFlow(script: RedisScript<T>, keys: List<K> = emptyList(), args: List<*> = emptyList<Any>()): Flow<T> =
execute(script, keys, args).asFlow()
@@ -57,7 +54,6 @@ fun <K : Any, V : Any, T : Any> ReactiveRedisOperations<K, V>.executeAsFlow(scri
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any, T : Any> ReactiveRedisOperations<K, V>.executeAsFlow(script: RedisScript<T>, keys: List<K> = emptyList(), args: List<*> = emptyList<Any>(), argsWriter: RedisElementWriter<*>, resultReader: RedisElementReader<T>): Flow<T> =
execute(script, keys, args, argsWriter, resultReader).asFlow()
@@ -76,7 +72,6 @@ suspend fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.sendAndAwait(destin
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.listenToChannelAsFlow(vararg channels: String): Flow<Message<String, V>> =
listenToChannel(*channels).asFlow()
@@ -86,7 +81,6 @@ fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.listenToChannelAsFlow(varar
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.listenToPatternAsFlow(vararg patterns: String): Flow<Message<String, V>> =
listenToPattern(*patterns).asFlow()
@@ -96,7 +90,6 @@ fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.listenToPatternAsFlow(varar
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.listenToAsFlow(vararg topics: Topic): Flow<Message<String, V>> =
listenTo(*topics).asFlow()
@@ -124,7 +117,6 @@ suspend fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.typeAndAwait(key: K
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.keysAsFlow(pattern: K): Flow<K> =
keys(pattern).asFlow()
@@ -134,7 +126,6 @@ fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.keysAsFlow(pattern: K): Flo
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveRedisOperations<K, V>.scanAsFlow(options: ScanOptions = ScanOptions.NONE): Flow<K> =
scan(options).asFlow()

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitFirstOrNull
@@ -54,7 +53,6 @@ suspend fun <K : Any, V : Any> ReactiveSetOperations<K, V>.popAndAwait(key: K):
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.popAsFlow(key: K, count: Long): Flow<V> =
pop(key, count).asFlow()
@@ -91,7 +89,6 @@ suspend fun <K : Any, V : Any> ReactiveSetOperations<K, V>.isMemberAndAwait(key:
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.intersectAsFlow(key: K, otherKey: K): Flow<V> =
intersect(key, otherKey).asFlow()
@@ -101,7 +98,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.intersectAsFlow(key: K, other
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.intersectAsFlow(key: K, otherKeys: Collection<K>): Flow<V> =
intersect(key, otherKeys).asFlow()
@@ -111,7 +107,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.intersectAsFlow(key: K, other
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.intersectAsFlow(otherKeys: Collection<K>): Flow<V> =
intersect(otherKeys).asFlow()
@@ -139,7 +134,6 @@ suspend fun <K : Any, V : Any> ReactiveSetOperations<K, V>.intersectAndStoreAndA
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.unionAsFlow(key: K, otherKey: K): Flow<V> =
union(key, otherKey).asFlow()
@@ -149,7 +143,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.unionAsFlow(key: K, otherKey:
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.unionAsFlow(key: K, otherKeys: Collection<K>): Flow<V> =
union(key, otherKeys).asFlow()
@@ -159,7 +152,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.unionAsFlow(key: K, otherKeys
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.unionAsFlow(otherKeys: Collection<K>): Flow<V> =
union(otherKeys).asFlow()
@@ -187,7 +179,6 @@ suspend fun <K : Any, V : Any> ReactiveSetOperations<K, V>.unionAndStoreAndAwait
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.differenceAsFlow(key: K, otherKey: K): Flow<V> =
difference(key, otherKey).asFlow()
@@ -197,7 +188,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.differenceAsFlow(key: K, othe
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.differenceAsFlow(key: K, otherKeys: Collection<K>): Flow<V> =
difference(key, otherKeys).asFlow()
@@ -207,7 +197,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.differenceAsFlow(key: K, othe
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.differenceAsFlow(otherKeys: Collection<K>): Flow<V> =
difference(otherKeys).asFlow()
@@ -235,7 +224,6 @@ suspend fun <K : Any, V : Any> ReactiveSetOperations<K, V>.differenceAndStoreAnd
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.membersAsFlow(key: K): Flow<V> =
members(key).asFlow()
@@ -245,7 +233,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.membersAsFlow(key: K): Flow<V
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.scanAsFlow(key: K, options: ScanOptions = ScanOptions.NONE): Flow<V> =
scan(key, options).asFlow()
/**
@@ -263,7 +250,6 @@ suspend fun <K : Any, V : Any> ReactiveSetOperations<K, V>.randomMemberAndAwait(
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.distinctRandomMembersAsFlow(key: K, count: Long): Flow<V> =
distinctRandomMembers(key, count).asFlow()
@@ -273,7 +259,6 @@ fun <K : Any, V : Any> ReactiveSetOperations<K, V>.distinctRandomMembersAsFlow(k
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveSetOperations<K, V>.randomMembersAsFlow(key: K, count: Long): Flow<V> =
randomMembers(key, count).asFlow()

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.asPublisher
@@ -57,7 +56,6 @@ suspend fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.ac
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.add(key: K, bodyFlow: Flow<Map<HK, HV>>): Flow<RecordId> =
add(key, bodyFlow.asPublisher()).asFlow()
@@ -158,7 +156,6 @@ suspend fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.si
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.rangeAsFlow(key: K, range: Range<String>, limit: Limit = Limit.unlimited()): Flow<MapRecord<K, HK, HV>>
= range(key, range, limit).asFlow()
@@ -168,7 +165,6 @@ fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.rangeAsFlo
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.rangeWithTypeAsFlow(key: K, range: Range<String>, limit: Limit = Limit.unlimited()): Flow<ObjectRecord<K, V>>
= range(V::class.java, key, range, limit).asFlow()
@@ -178,7 +174,6 @@ inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.rangeWit
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow(vararg stream: StreamOffset<K>): Flow<MapRecord<K, HK, HV>> =
read(*stream).asFlow()
@@ -188,7 +183,6 @@ fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow(readOptions: StreamReadOptions, vararg stream: StreamOffset<K>): Flow<MapRecord<K, HK, HV>> =
read(readOptions, *stream).asFlow()
@@ -198,7 +192,6 @@ fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWithTypeAsFlow(vararg stream: StreamOffset<K>): Flow<ObjectRecord<K, V>> =
read(V::class.java, *stream).asFlow()
@@ -209,7 +202,6 @@ inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWith
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWithTypeAsFlow(readOptions: StreamReadOptions, vararg stream: StreamOffset<K>): Flow<ObjectRecord<K, V>> =
read(V::class.java, readOptions, *stream).asFlow()
@@ -219,7 +211,6 @@ inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWith
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow(consumer: Consumer, vararg stream: StreamOffset<K>): Flow<MapRecord<K, HK, HV>> =
read(consumer, *stream).asFlow()
@@ -229,7 +220,6 @@ fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow(consumer: Consumer, readOptions: StreamReadOptions, vararg stream: StreamOffset<K>): Flow<MapRecord<K, HK, HV>> =
read(consumer, readOptions, *stream).asFlow()
@@ -239,7 +229,6 @@ fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.readAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWithTypeAsFlow(consumer: Consumer, vararg stream: StreamOffset<K>): Flow<ObjectRecord<K, V>> =
read(V::class.java, consumer, *stream).asFlow()
@@ -249,7 +238,6 @@ inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWith
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWithTypeAsFlow(consumer: Consumer, readOptions: StreamReadOptions, vararg stream: StreamOffset<K>): Flow<ObjectRecord<K, V>> =
read(V::class.java, consumer, readOptions, *stream).asFlow()
@@ -259,7 +247,6 @@ inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.readWith
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.reverseRangeAsFlow(key: K, range: Range<String>, limit: Limit = Limit.unlimited()): Flow<MapRecord<K, HK, HV>>
= reverseRange(key, range, limit).asFlow()
@@ -269,7 +256,6 @@ fun <K : Any, HK : Any, HV : Any> ReactiveStreamOperations<K, HK, HV>.reverseRan
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
inline fun <K : Any, reified V : Any> ReactiveStreamOperations<K, *, *>.reverseRangeWithTypeAsFlow(key: K, range: Range<String>, limit: Limit = Limit.unlimited()): Flow<ObjectRecord<K, V>> =
reverseRange(V::class.java, key, range, limit).asFlow()

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.core
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitFirstOrNull
@@ -85,7 +84,6 @@ suspend fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRankAndAwait(
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeAsFlow(key: K, range: Range<Long>): Flow<V> =
range(key, range).asFlow()
@@ -95,7 +93,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeAsFlow(key: K, range: R
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeWithScoresAsFlow(key: K, range: Range<Long>): Flow<TypedTuple<V>> =
rangeWithScores(key, range).asFlow()
@@ -105,7 +102,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeWithScoresAsFlow(key: K
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeByScoreAsFlow(key: K, range: Range<Double>, limit: Limit? = null): Flow<V> =
(if (limit == null) rangeByScore(key, range) else rangeByScore(key, range, limit)).asFlow()
@@ -115,7 +111,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeByScoreAsFlow(key: K, r
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeByScoreWithScoresAsFlow(key: K, range: Range<Double>, limit: Limit? = null): Flow<TypedTuple<V>> =
(if (limit == null) rangeByScoreWithScores(key, range) else rangeByScoreWithScores(key, range, limit)).asFlow()
@@ -125,7 +120,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.rangeByScoreWithScoresAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeAsFlow(key: K, range: Range<Long>): Flow<V> =
reverseRange(key, range).asFlow()
@@ -135,7 +129,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeAsFlow(key: K, r
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeWithScoresAsFlow(key: K, range: Range<Long>): Flow<TypedTuple<V>> =
reverseRangeWithScores(key, range).asFlow()
@@ -145,7 +138,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeWithScoresAsFlow
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeByScoreAsFlow(key: K, range: Range<Double>, limit: Limit? = null): Flow<V> =
(if (limit == null) reverseRangeByScore(key, range) else reverseRangeByScore(key, range, limit)).asFlow()
@@ -155,7 +147,6 @@ fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeByScoreAsFlow(ke
* @author Sebastien Deleuze
* @since 2.2
*/
@ExperimentalCoroutinesApi
fun <K : Any, V : Any> ReactiveZSetOperations<K, V>.reverseRangeByScoreWithScoresAsFlow(key: K, range: Range<Double>, limit: Limit? = null): Flow<TypedTuple<V>> =
(if (limit == null) reverseRangeByScoreWithScores(key, range) else reverseRangeByScoreWithScores(key, range, limit)).asFlow()

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.toList
@@ -106,7 +105,6 @@ class ReactiveGeoOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun addGeoLocationFlow() {
val operations = mockk<ReactiveGeoOperations<String, String>>()
@@ -274,7 +272,6 @@ class ReactiveGeoOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun radiusAsFlowCircle() {
val operations = mockk<ReactiveGeoOperations<String, String>>()
@@ -292,7 +289,6 @@ class ReactiveGeoOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun radiusAsFlowCircleAndArgs() {
val operations = mockk<ReactiveGeoOperations<String, String>>()
@@ -311,7 +307,6 @@ class ReactiveGeoOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun radiusAsFlowMemberAndRadius() {
val operations = mockk<ReactiveGeoOperations<String, String>>()
@@ -329,7 +324,6 @@ class ReactiveGeoOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun radiusAsFlowDistance() {
val operations = mockk<ReactiveGeoOperations<String, String>>()
@@ -348,7 +342,6 @@ class ReactiveGeoOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun radiusAsFlowDistanceAndArgs() {
val operations = mockk<ReactiveGeoOperations<String, String>>()

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions.assertThat
@@ -111,7 +110,6 @@ class ReactiveHashOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun keys() {
val operations = mockk<ReactiveHashOperations<String, String, String>>()
every { operations.keys(any()) } returns Flux.just("bar", "baz")
@@ -201,7 +199,6 @@ class ReactiveHashOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun values() {
val operations = mockk<ReactiveHashOperations<String, String, String>>()
@@ -217,7 +214,6 @@ class ReactiveHashOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun entries() {
val entry = java.util.AbstractMap.SimpleEntry("bar", "baz")
@@ -234,7 +230,6 @@ class ReactiveHashOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun scan() {
val entry = java.util.AbstractMap.SimpleEntry("bar", "baz")

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions.assertThat
@@ -36,7 +35,6 @@ import java.time.Duration
class ReactiveListOperationsExtensionsUnitTests {
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun range() {
val operations = mockk<ReactiveListOperations<String, String>>()

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
@@ -45,7 +44,6 @@ import java.time.Instant
class ReactiveRedisOperationsExtensionsUnitTests {
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `execute with calllback`() {
val operations = mockk<ReactiveRedisOperations<String, String>>()
@@ -61,7 +59,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `execute with script`() {
val script = RedisScript.of<String>("foo")
@@ -78,7 +75,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `execute with script, argsWriter and resultReader`() {
val script = RedisScript.of<String>("foo")
@@ -112,7 +108,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun listenToChannel() {
val message = ReactiveSubscription.ChannelMessage("a", "b")
@@ -129,7 +124,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun listenToPattern() {
val message = ReactiveSubscription.ChannelMessage("a", "b")
@@ -146,7 +140,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun listenTo() {
val topic1 = ChannelTopic.of("foo")
@@ -195,7 +188,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun keys() {
val operations = mockk<ReactiveRedisOperations<String, String>>()
@@ -211,7 +203,6 @@ class ReactiveRedisOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun scan() {
val operations = mockk<ReactiveRedisOperations<String, String>>()

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions.assertThat
@@ -81,7 +80,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `pop as Flow`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -157,7 +155,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun intersect() {
val operations = mockk<ReactiveSetOperations<String, String>>()
every { operations.intersect("foo", "bar") } returns Flux.just("baz")
@@ -172,7 +169,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `intersect with key and collection`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
every { operations.intersect("foo", listOf("bar")) } returns Flux.just("baz")
@@ -187,7 +183,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `intersect with collection`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
every { operations.intersect(listOf("bar")) } returns Flux.just("baz")
@@ -232,7 +227,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun union() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -248,7 +242,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `union with key and collection`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -264,7 +257,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `union with collection`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -310,7 +302,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun difference() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -326,7 +317,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `difference with key and collection`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -342,7 +332,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `difference with collection`() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -388,7 +377,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun members() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -404,7 +392,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun scan() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -450,7 +437,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun distinctRandomMembers() {
val operations = mockk<ReactiveSetOperations<String, String>>()
@@ -466,7 +452,6 @@ class ReactiveSetOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun randomMembers() {
val operations = mockk<ReactiveSetOperations<String, String>>()

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
@@ -103,7 +102,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `add as Flow`() {
val map = mapOf("a" to "b")
@@ -261,7 +259,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun range() {
val record = MapRecord.create("foo", mapOf("a" to "b"))
@@ -279,7 +276,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun rangeWithType() {
val record = ObjectRecord.create("a", "b")
@@ -297,7 +293,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with StreamOffset vararg`() {
val offset1 = StreamOffset.create("foo", ReadOffset.lastConsumed())
@@ -316,7 +311,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with options and StreamOffset vararg` () {
val offset1 = StreamOffset.create("foo", ReadOffset.lastConsumed())
@@ -336,7 +330,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with type and StreamOffset vararg`() {
val offset1 = StreamOffset.create("foo", ReadOffset.lastConsumed())
@@ -355,7 +348,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with type, options and StreamOffset vararg` () {
val offset1 = StreamOffset.create("foo", ReadOffset.lastConsumed())
@@ -375,7 +367,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with consumer and StreamOffset vararg`() {
val consumer = Consumer.from("a", "b")
@@ -395,7 +386,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with consumer, options and StreamOffset vararg`() {
val consumer = Consumer.from("a", "b")
@@ -416,7 +406,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with type, consumer and StreamOffset vararg`() {
val consumer = Consumer.from("a", "b")
@@ -436,7 +425,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun `read with type, consumer, options and StreamOffset vararg`() {
val consumer = Consumer.from("a", "b")
@@ -457,7 +445,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun reverseRange() {
val record = MapRecord.create("foo", mapOf("a" to "b"))
@@ -475,7 +462,6 @@ class ReactiveStreamOperationsExtensionsUnitTests {
}
@Test // DATAREDIS-1033
@ExperimentalCoroutinesApi
fun reverseRangeWithType() {
val record = ObjectRecord.create("a", "b")

View File

@@ -18,7 +18,6 @@ package org.springframework.data.redis.core
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions.assertThat
@@ -159,7 +158,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun range() {
val range = Range.unbounded<Long>()
@@ -176,7 +174,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun rangeWithScores() {
val tuple = mockk<TypedTuple<String>>(relaxed = true)
@@ -194,7 +191,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun rangeByScore() {
val range = Range.unbounded<Double>()
@@ -211,7 +207,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun rangeByScoreWithScores() {
val tuple = mockk<TypedTuple<String>>(relaxed = true)
@@ -229,7 +224,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun reverseRange() {
val range = Range.unbounded<Long>()
@@ -246,7 +240,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun reverseRangeWithScores() {
val tuple = mockk<TypedTuple<String>>(relaxed = true)
@@ -264,7 +257,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun reverseRangeByScore() {
val range = Range.unbounded<Double>()
@@ -281,7 +273,6 @@ class ReactiveZSetOperationsExtensionsUnitTests {
}
@Test
@ExperimentalCoroutinesApi
fun reverseRangeByScoreWithScores() {
val tuple = mockk<TypedTuple<String>>(relaxed = true)