Package net.jodah.lyra.event

Examples of net.jodah.lyra.event.DefaultChannelListener


  public void shouldHandleRecoveryFailureFromChannelListener() throws Throwable {
    final AtomicBoolean shutdownCalled = new AtomicBoolean();
    config = new Config().withRetryPolicy(
        RetryPolicies.retryAlways().withInterval(Duration.millis(10)))
        .withRecoveryPolicy(RecoveryPolicies.recoverAlways())
        .withChannelListeners(new DefaultChannelListener() {
          @Override
          public void onRecovery(Channel channel) {
            if (!shutdownCalled.get() && channel == mockChannel(2).proxy) {
              ShutdownSignalException e = nonRetryableChannelShutdownSignal();
              shutdownCalled.set(true);
View Full Code Here


      public void onRecoveryFailure(Connection connection, Throwable failure) {
        waiter.resume();
      }
    });

    config.withChannelListeners(new DefaultChannelListener() {
      @Override
      public void onRecovery(Channel channel) {
        waiter.resume();
      }
View Full Code Here

TOP

Related Classes of net.jodah.lyra.event.DefaultChannelListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.