|
6 | 6 | import io.netty.channel.nio.NioEventLoopGroup; |
7 | 7 | import io.netty.util.concurrent.DefaultThreadFactory; |
8 | 8 | import io.netty.util.concurrent.Future; |
9 | | -import io.scalecube.services.api.ServiceMessage; |
10 | 9 | import io.scalecube.services.transport.api.ClientTransport; |
11 | 10 | import io.scalecube.services.transport.api.DataCodec; |
12 | 11 | import io.scalecube.services.transport.api.HeadersCodec; |
13 | | -import io.scalecube.services.transport.api.ReferenceCountUtil; |
14 | 12 | import io.scalecube.services.transport.api.ServerTransport; |
15 | 13 | import io.scalecube.services.transport.api.ServiceMessageCodec; |
16 | 14 | import io.scalecube.services.transport.api.ServiceTransport; |
|
19 | 17 | import java.util.concurrent.ThreadFactory; |
20 | 18 | import java.util.function.Function; |
21 | 19 | import reactor.core.publisher.Flux; |
22 | | -import reactor.core.publisher.Hooks; |
23 | 20 | import reactor.core.publisher.Mono; |
24 | 21 | import reactor.netty.FutureMono; |
25 | 22 | import reactor.netty.resources.LoopResources; |
|
29 | 26 | /** RSocket service transport. */ |
30 | 27 | public class RSocketServiceTransport implements ServiceTransport { |
31 | 28 |
|
32 | | - static { |
33 | | - Hooks.onNextDropped( |
34 | | - obj -> |
35 | | - ReferenceCountUtil.safestRelease( |
36 | | - obj instanceof ServiceMessage ? ((ServiceMessage) obj).data() : obj)); |
37 | | - } |
38 | | - |
39 | 29 | private int numOfWorkers = Runtime.getRuntime().availableProcessors(); |
40 | 30 | private HeadersCodec headersCodec; |
41 | 31 | private Collection<DataCodec> dataCodecs; |
|
0 commit comments