Skip to content

Commit ced3c81

Browse files
authored
Merge pull request #386 from scalecube/cleanup_cluster_api_from_transport_api
Removed transport api from Cluster interface
2 parents bd22533 + 5c03268 commit ced3c81

File tree

5 files changed

+0
-244
lines changed

5 files changed

+0
-244
lines changed

cluster-api/src/main/java/io/scalecube/cluster/Cluster.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,6 @@ public interface Cluster {
1616
*/
1717
Address address();
1818

19-
/**
20-
* Send a msg from this member (src) to target member (specified in parameters).
21-
*
22-
* @param member target member
23-
* @param message msg
24-
* @return promise telling success or failure
25-
*/
26-
Mono<Void> send(Member member, Message message);
27-
28-
/**
29-
* Send a msg from this member (src) to target member (specified in parameters).
30-
*
31-
* @param address target address
32-
* @param message msg
33-
* @return promise telling success or failure
34-
*/
35-
Mono<Void> send(Address address, Message message);
36-
37-
/**
38-
* Sends message to the given address. It will issue connect in case if no transport channel by
39-
* given transport {@code address} exists already. Send is an async operation and expecting a
40-
* response by a provided correlationId and sender address of the caller.
41-
*
42-
* @param address address where message will be sent
43-
* @param request to send message must contain correlctionId and sender to handle reply.
44-
* @return promise which will be completed with result of sending (message or exception)
45-
* @throws IllegalArgumentException if {@code message} or {@code address} is null
46-
*/
47-
Mono<Message> requestResponse(Address address, Message request);
48-
49-
/**
50-
* Sends message to the given address. It will issue connect in case if no transport channel by
51-
* given transport {@code address} exists already. Send is an async operation and expecting a
52-
* response by a provided correlationId and sender address of the caller.
53-
*
54-
* @param member where message will be sent
55-
* @param request to send message must contain correlctionId and sender to handle reply.
56-
* @return promise which will be completed with result of sending (message or exception)
57-
* @throws IllegalArgumentException if {@code message} or {@code address} is null
58-
*/
59-
Mono<Message> requestResponse(Member member, Message request);
60-
6119
/**
6220
* Spreads given message between cluster members using gossiping protocol.
6321
*

cluster/src/main/java/io/scalecube/cluster/ClusterImpl.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -389,26 +389,6 @@ public Address address() {
389389
return member().address();
390390
}
391391

392-
@Override
393-
public Mono<Void> send(Member member, Message message) {
394-
return send(member.address(), message);
395-
}
396-
397-
@Override
398-
public Mono<Void> send(Address address, Message message) {
399-
return transport.send(address, message);
400-
}
401-
402-
@Override
403-
public Mono<Message> requestResponse(Address address, Message request) {
404-
return transport.requestResponse(address, request);
405-
}
406-
407-
@Override
408-
public Mono<Message> requestResponse(Member member, Message request) {
409-
return transport.requestResponse(member.address(), request);
410-
}
411-
412392
@Override
413393
public Mono<String> spreadGossip(Message message) {
414394
return gossip.spread(message);

examples/src/main/java/io/scalecube/examples/ClusterMetadataExample.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import io.scalecube.transport.netty.tcp.TcpTransportFactory;
99
import java.util.Collections;
1010
import java.util.Optional;
11-
import java.util.concurrent.TimeUnit;
1211

1312
/**
1413
* Using Cluster metadata: metadata is set of custom parameters that may be used by application
@@ -49,18 +48,5 @@ public void onMessage(Message message) {
4948

5049
System.err.println("### joeMemberOptional: " + joeMemberOptional);
5150
System.err.println("### joeMetadata: " + alice.metadata(joeMemberOptional.get()));
52-
53-
// Send hello to Joe
54-
joeMemberOptional.ifPresent(
55-
member ->
56-
alice
57-
.send(member, Message.withData("Hello Joe").build())
58-
.subscribe(
59-
null,
60-
ex -> {
61-
// no-op
62-
}));
63-
64-
TimeUnit.SECONDS.sleep(3);
6551
}
6652
}

examples/src/main/java/io/scalecube/examples/MessagingExample.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

examples/src/main/java/io/scalecube/examples/WebsocketMessagingExample.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)