@Test public void testSendPurgeAllMessage() throws Exception { SxpConnection connection = mockConnection(Version.Version4); BindingDispatcher.sendPurgeAllMessage(connection); verify(worker).executeTaskInSequence(any(Callable.class), eq(ThreadsWorker.WorkerType.OUTBOUND), eq(connection)); }
public static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection) { return Preconditions.checkNotNull(connection) .getOwner() .getWorker() .executeTaskInSequence(() -> sendPurgeAllMessageSync(connection), ThreadsWorker.WorkerType.OUTBOUND, connection); }
BindingDispatcher { public static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection) { return Preconditions.checkNotNull(connection) .getOwner() .getWorker() .executeTaskInSequence(() -> sendPurgeAllMessageSync(connection), ThreadsWorker.WorkerType.OUTBOUND, connection); } }
BindingDispatcher { public static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection) { return Preconditions.checkNotNull(connection) .getOwner() .getWorker() .executeTaskInSequence(() -> sendPurgeAllMessageSync(connection), ThreadsWorker.WorkerType.OUTBOUND, connection); } BindingDispatcher(SxpNode owner); }
BindingDispatcher { public static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection) { return Preconditions.checkNotNull(connection) .getOwner() .getWorker() .executeTaskInSequence(() -> sendPurgeAllMessageSync(connection), ThreadsWorker.WorkerType.OUTBOUND, connection); } BindingDispatcher(SxpNode owner); void setPartitionSize(int partitionSize); void propagateUpdate(List<T> deleteBindings, List<T> addBindings,
                                                             List<SxpConnection> connections); static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection); static boolean sendPurgeAllMessageSync(final SxpConnection connection); SxpNode getOwner(); }
BindingDispatcher { public static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection) { return Preconditions.checkNotNull(connection) .getOwner() .getWorker() .executeTaskInSequence(() -> sendPurgeAllMessageSync(connection), ThreadsWorker.WorkerType.OUTBOUND, connection); } BindingDispatcher(SxpNode owner); void setPartitionSize(int partitionSize); void propagateUpdate(List<T> deleteBindings, List<T> addBindings,
                                                             List<SxpConnection> connections); static ListenableFuture<Boolean> sendPurgeAllMessage(final SxpConnection connection); static boolean sendPurgeAllMessageSync(final SxpConnection connection); SxpNode getOwner();  }