use of org.apache.cassandra.net.IMessageSink in project cassandra by apache.
the class AbstractPendingRepairTest method setupClass.
@BeforeClass
public static void setupClass() {
SchemaLoader.prepareServer();
ARS = ActiveRepairService.instance;
LocalSessionAccessor.startup();
// cutoff messaging service
MessagingService.instance().addMessageSink(new IMessageSink() {
public boolean allowOutgoingMessage(MessageOut message, int id, InetAddress to) {
return false;
}
public boolean allowIncomingMessage(MessageIn message, int id) {
return false;
}
});
}
use of org.apache.cassandra.net.IMessageSink in project cassandra by apache.
the class ValidatorTest method registerOutgoingMessageSink.
private CompletableFuture<MessageOut> registerOutgoingMessageSink() {
final CompletableFuture<MessageOut> future = new CompletableFuture<>();
MessagingService.instance().addMessageSink(new IMessageSink() {
public boolean allowOutgoingMessage(MessageOut message, int id, InetAddress to) {
future.complete(message);
return false;
}
public boolean allowIncomingMessage(MessageIn message, int id) {
return false;
}
});
return future;
}
Aggregations