Skip to content

Commit 2302c1c

Browse files
committed
Reverted trivial deprecations
1 parent 42ef370 commit 2302c1c

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

transport-parent/transport-netty/src/main/java/io/scalecube/transport/netty/TransportImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ public static Mono<Transport> bind(TransportConfig config) {
148148
*/
149149
@Override
150150
public Mono<Transport> start() {
151-
return Mono.deferContextual(context -> receiver.bind())
151+
return Mono.deferWithContext(context -> receiver.bind())
152152
.doOnNext(this::init)
153153
.doOnSuccess(t -> LOGGER.info("[bind0][{}] Bound cluster transport", t.address()))
154154
.doOnError(ex -> LOGGER.error("[bind0][{}] Exception occurred: {}", address, ex.toString()))
155155
.thenReturn(this)
156156
.cast(Transport.class)
157-
.contextWrite(
157+
.subscriberContext(
158158
context ->
159159
context.put(
160160
ReceiverContext.class,
@@ -200,12 +200,12 @@ public final Flux<Message> listen() {
200200

201201
@Override
202202
public Mono<Void> send(Address address, Message message) {
203-
return Mono.deferContextual(context -> connections.computeIfAbsent(address, this::connect0))
203+
return Mono.deferWithContext(context -> connections.computeIfAbsent(address, this::connect0))
204204
.flatMap(
205205
connection ->
206-
Mono.deferContextual(context -> sender.send(message))
207-
.contextWrite(context -> context.put(Connection.class, connection)))
208-
.contextWrite(
206+
Mono.deferWithContext(context -> sender.send(message))
207+
.subscriberContext(context -> context.put(Connection.class, connection)))
208+
.subscriberContext(
209209
context ->
210210
context.put(
211211
SenderContext.class, new SenderContext(loopResources, this::toByteBuf)));

transport-parent/transport-netty/src/main/java/io/scalecube/transport/netty/tcp/TcpReceiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class TcpReceiver implements Receiver {
1919

2020
@Override
2121
public Mono<DisposableServer> bind() {
22-
return Mono.deferContextual(context -> Mono.just(context.get(ReceiverContext.class)))
22+
return Mono.deferWithContext(context -> Mono.just(context.get(ReceiverContext.class)))
2323
.flatMap(
2424
context ->
2525
newTcpServer(context)

transport-parent/transport-netty/src/main/java/io/scalecube/transport/netty/tcp/TcpSender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ final class TcpSender implements Sender {
2121

2222
@Override
2323
public Mono<Connection> connect(Address address) {
24-
return Mono.deferContextual(context -> Mono.just(context.get(SenderContext.class)))
24+
return Mono.deferWithContext(context -> Mono.just(context.get(SenderContext.class)))
2525
.map(context -> newTcpClient(context, address))
2626
.flatMap(TcpClient::connect);
2727
}
2828

2929
@Override
3030
public Mono<Void> send(Message message) {
31-
return Mono.deferContextual(
31+
return Mono.deferWithContext(
3232
context -> {
3333
Connection connection = context.get(Connection.class);
3434
SenderContext senderContext = context.get(SenderContext.class);

transport-parent/transport-netty/src/main/java/io/scalecube/transport/netty/websocket/WebsocketReceiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class WebsocketReceiver implements Receiver {
2424

2525
@Override
2626
public Mono<DisposableServer> bind() {
27-
return Mono.deferContextual(context -> Mono.just(context.get(ReceiverContext.class)))
27+
return Mono.deferWithContext(context -> Mono.just(context.get(ReceiverContext.class)))
2828
.flatMap(
2929
context ->
3030
newHttpServer(context)

transport-parent/transport-netty/src/main/java/io/scalecube/transport/netty/websocket/WebsocketSender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ final class WebsocketSender implements Sender {
2323

2424
@Override
2525
public Mono<Connection> connect(Address address) {
26-
return Mono.deferContextual(context -> Mono.just(context.get(SenderContext.class)))
26+
return Mono.deferWithContext(context -> Mono.just(context.get(SenderContext.class)))
2727
.map(context -> newWebsocketSender(context, address))
2828
.flatMap(sender -> sender.uri("/").connect());
2929
}
3030

3131
@Override
3232
public Mono<Void> send(Message message) {
33-
return Mono.deferContextual(
33+
return Mono.deferWithContext(
3434
context -> {
3535
Connection connection = context.get(Connection.class);
3636
SenderContext senderContext = context.get(SenderContext.class);

0 commit comments

Comments
 (0)