• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 @file:JvmMultifileClass
2 @file:JvmName("FlowKt")
3 
4 package kotlinx.coroutines.reactive
5 
6 import kotlinx.coroutines.*
7 import kotlinx.coroutines.flow.*
8 import org.reactivestreams.*
9 
10 // Binary compatibility with Spring 5.2 RC
11 /** @suppress */
12 @Deprecated(
13     message = "Replaced in favor of ReactiveFlow extension, please import kotlinx.coroutines.reactive.* instead of kotlinx.coroutines.reactive.FlowKt",
14     level = DeprecationLevel.HIDDEN
15 )
16 @JvmName("asFlow")
asFlowDeprecatednull17 public fun <T : Any> Publisher<T>.asFlowDeprecated(): Flow<T> = asFlow()
18 
19 // Binary compatibility with Spring 5.2 RC
20 /** @suppress */
21 @Deprecated(
22     message = "Replaced in favor of ReactiveFlow extension, please import kotlinx.coroutines.reactive.* instead of kotlinx.coroutines.reactive.FlowKt",
23     level = DeprecationLevel.HIDDEN
24 )
25 @JvmName("asPublisher")
26 public fun <T : Any> Flow<T>.asPublisherDeprecated(): Publisher<T> = asPublisher()
27 
28 /** @suppress */
29 @Deprecated(
30     message = "batchSize parameter is deprecated, use .buffer() instead to control the backpressure",
31     level = DeprecationLevel.HIDDEN,
32     replaceWith = ReplaceWith("asFlow().buffer(batchSize)", imports = ["kotlinx.coroutines.flow.*"])
33 )
34 public fun <T : Any> Publisher<T>.asFlow(batchSize: Int): Flow<T> = asFlow().buffer(batchSize)
35