congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SimpleTcpCluster.setState
Code IndexAdd Tabnine to your IDE (free)

How to use
setState
method
in
org.apache.catalina.ha.tcp.SimpleTcpCluster

Best Java code snippets using org.apache.catalina.ha.tcp.SimpleTcpCluster.setState (Showing top 6 results out of 315)

origin: codefollower/Tomcat-Research

/**
 * Stop Cluster and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  unregisterMember(channel.getLocalMember(false));
  if (clusterDeployer != null) clusterDeployer.stop();
  this.managers.clear();
  try {
    if ( clusterDeployer != null ) clusterDeployer.setCluster(null);
    channel.stop(channelStartOptions);
    channel.removeChannelListener(this);
    channel.removeMembershipListener(this);
    this.unregisterClusterValve();
  } catch (Exception x) {
    log.error("Unable to stop cluster.", x);
  }
}
origin: org.apache.geronimo.ext.tomcat/catalina-ha

/**
 * Stop Cluster and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  unregisterMember(channel.getLocalMember(false));
  if (clusterDeployer != null) clusterDeployer.stop();
  this.managers.clear();
  try {
    if ( clusterDeployer != null ) clusterDeployer.setCluster(null);
    channel.stop(channelStartOptions);
    channel.removeChannelListener(this);
    channel.removeMembershipListener(this);
    this.unregisterClusterValve();
  } catch (Exception x) {
    log.error("Unable to stop cluster valve.", x);
  }
}
origin: org.apache.tomcat/tomcat-catalina-ha

/**
 * Stop Cluster and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  unregisterMember(channel.getLocalMember(false));
  if (clusterDeployer != null) clusterDeployer.stop();
  this.managers.clear();
  try {
    if ( clusterDeployer != null ) clusterDeployer.setCluster(null);
    channel.stop(channelStartOptions);
    channel.removeChannelListener(this);
    channel.removeMembershipListener(this);
    this.unregisterClusterValve();
  } catch (Exception x) {
    log.error(sm.getString("simpleTcpCluster.stopUnable"), x);
  }
}
origin: org.apache.geronimo.ext.tomcat/catalina-ha

/**
 * Start Cluster and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  if (log.isInfoEnabled()) log.info("Cluster is about to start");
  try {
    checkDefaults();
    registerClusterValve();
    channel.addMembershipListener(this);
    channel.addChannelListener(this);
    channel.start(channelStartOptions);
    if (clusterDeployer != null) clusterDeployer.start();
    registerMember(channel.getLocalMember(false));
  } catch (Exception x) {
    log.error("Unable to start cluster.", x);
    throw new LifecycleException(x);
  }
  
  setState(LifecycleState.STARTING);
}
origin: codefollower/Tomcat-Research

/**
 * Start Cluster and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  if (log.isInfoEnabled()) log.info("Cluster is about to start");
  try {
    checkDefaults();
    registerClusterValve();
    channel.addMembershipListener(this);
    channel.addChannelListener(this);
    channel.start(channelStartOptions);
    if (clusterDeployer != null) clusterDeployer.start();
    registerMember(channel.getLocalMember(false));
  } catch (Exception x) {
    log.error("Unable to start cluster.", x);
    throw new LifecycleException(x);
  }
  setState(LifecycleState.STARTING);
}
origin: org.apache.tomcat/tomcat-catalina-ha

/**
 * Start Cluster and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  if (log.isInfoEnabled()) log.info(sm.getString("simpleTcpCluster.start"));
  try {
    checkDefaults();
    registerClusterValve();
    channel.addMembershipListener(this);
    channel.addChannelListener(this);
    channel.setName(getClusterName() + "-Channel");
    channel.start(channelStartOptions);
    if (clusterDeployer != null) clusterDeployer.start();
    registerMember(channel.getLocalMember(false));
  } catch (Exception x) {
    log.error(sm.getString("simpleTcpCluster.startUnable"), x);
    throw new LifecycleException(x);
  }
  setState(LifecycleState.STARTING);
}
org.apache.catalina.ha.tcpSimpleTcpClustersetState

Popular methods of SimpleTcpCluster

  • addValve
    Add cluster valve Cluster Valves are only add to container when cluster is started!
  • checkDefaults
  • getContainer
    Get the Container associated with our Cluster
  • getManagerTemplate
  • isHeartbeatBackgroundEnabled
    Return heartbeat enable flag (default false)
  • addClusterListener
    Add cluster message listener and register cluster to this listener.
  • fireLifecycleEvent
  • getClusterName
    Return the name of the cluster that this Server is currently configured to operate within.
  • getLocalMember
    Return the member that represents this node.
  • getManagerName
  • messageReceived
  • register
  • messageReceived,
  • register,
  • registerClusterValve,
  • registerMember,
  • send,
  • unregister,
  • unregisterClusterValve,
  • unregisterMember,
  • findClusterListeners

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Menu (java.awt)
  • Kernel (java.awt.image)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 12 Jupyter Notebook extensions
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