Tabnine Logo
ReconnectPolicy
Code IndexAdd Tabnine to your IDE (free)

How to use
ReconnectPolicy
in
org.jboss.as.host.controller

Best Java code snippets using org.jboss.as.host.controller.ReconnectPolicy (Showing top 6 results out of 315)

origin: wildfly/wildfly-core

  @Override
  public Connection call() throws Exception {
    final ReconnectPolicy reconnectPolicy = ReconnectPolicy.RECONNECT;
    int reconnectionCount = 0;
    for(;;) {
      // Try to connect to the remote host controller by looping through all
      // discovery options
      reconnectPolicy.wait(reconnectionCount);
      HostControllerLogger.ROOT_LOGGER.reconnectingToMaster();
      for (Iterator<DiscoveryOption> i = discoveryOptions.iterator(); i.hasNext(); ) {
        DiscoveryOption discoveryOption = i.next();
        URI masterURI = null;
        try {
          List<RemoteDomainControllerConnectionConfiguration> remoteDcConfigs = discoveryOption.discover();
          for (RemoteDomainControllerConnectionConfiguration remoteDcConfig : remoteDcConfigs) {
            try {
              return connect(remoteDcConfig);
            } catch (IOException ioe) {
              // If the cause is one of the irrecoverable ones, unwrap and throw it on
              RemoteDomainConnectionService.rethrowIrrecoverableConnectionFailures(ioe);
            }
          }
        } catch (Exception e) {
          RemoteDomainConnectionService.logConnectionException(masterURI, discoveryOption, i.hasNext(), e);
        }
      }
      reconnectionCount++;
    }
  }
});
origin: org.wildfly.core/wildfly-host-controller

  @Override
  public Connection call() throws Exception {
    final ReconnectPolicy reconnectPolicy = ReconnectPolicy.RECONNECT;
    int reconnectionCount = 0;
    for(;;) {
      // Try to connect to the remote host controller by looping through all
      // discovery options
      reconnectPolicy.wait(reconnectionCount);
      HostControllerLogger.ROOT_LOGGER.reconnectingToMaster();
      for (Iterator<DiscoveryOption> i = discoveryOptions.iterator(); i.hasNext(); ) {
        DiscoveryOption discoveryOption = i.next();
        URI masterURI = null;
        try {
          List<RemoteDomainControllerConnectionConfiguration> remoteDcConfigs = discoveryOption.discover();
          for (RemoteDomainControllerConnectionConfiguration remoteDcConfig : remoteDcConfigs) {
            try {
              return connect(remoteDcConfig);
            } catch (IOException ioe) {
              // If the cause is one of the irrecoverable ones, unwrap and throw it on
              RemoteDomainConnectionService.rethrowIrrecoverableConnectionFailures(ioe);
            }
          }
        } catch (Exception e) {
          RemoteDomainConnectionService.logConnectionException(masterURI, discoveryOption, i.hasNext(), e);
        }
      }
      reconnectionCount++;
    }
  }
});
origin: org.jboss.as/jboss-as-host-controller

  @Override
  public Connection call() throws Exception {
    final ReconnectPolicy reconnectPolicy = ReconnectPolicy.RECONNECT;
    int reconnectionCount = 0;
    for(;;) {
      try {
        //
        reconnectPolicy.wait(reconnectionCount);
        HostControllerLogger.ROOT_LOGGER.debugf("trying to reconnect to remote host-controller");
        // Try to the connect to the remote host controller
        return connectionManager.connect();
      } catch (IOException e) {
        HostControllerLogger.ROOT_LOGGER.debugf(e, "failed to reconnect to the remote host-controller");
      } finally {
        reconnectionCount++;
      }
    }
  }
});
origin: org.wildfly.core/wildfly-host-controller

  ReconnectPolicy.CONNECT.wait(retries);
  retries++;
} catch (InterruptedException ie) {
origin: wildfly/wildfly-core

  ReconnectPolicy.CONNECT.wait(retries);
  retries++;
} catch (InterruptedException ie) {
origin: org.jboss.as/jboss-as-host-controller

  ReconnectPolicy.CONNECT.wait(retries);
  retries++;
} catch (InterruptedException ie) {
org.jboss.as.host.controllerReconnectPolicy

Javadoc

Policy used to automatically try to reconnect to a crashed master HC.

Most used methods

  • wait
    Respawn a process.

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JList (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Runner (org.openjdk.jmh.runner)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now