Tabnine Logo
SimpleTcpCluster.getClusterName
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.tomee/tomee-catalina

public SimpleTomEETcpCluster(final SimpleTcpCluster from) {
  clusterListeners.addAll(Arrays.asList(from.findClusterListeners()));
  setClusterName(from.getClusterName());
  setContainer(from.getContainer());
  setNotifyLifecycleListenerOnFailure(from.isNotifyLifecycleListenerOnFailure());
  setChannelSendOptions(from.getChannelSendOptions());
  setChannelStartOptions(from.getChannelStartOptions());
  setHeartbeatBackgroundEnabled(from.isHeartbeatBackgroundEnabled());
  setChannel(from.getChannel());
  getManagers().putAll(from.getManagers());
  setManagerTemplate(from.getManagerTemplate());
  setClusterDeployer(from.getClusterDeployer());
  for (final Valve valve : from.getValves()) {
    addValve(valve);
  }
}
origin: apache/ofbiz-framework

private Property prepareTomcatClustering(Host host, Property engineConfig) throws ContainerException {
  Property clusterProp = null;
  List<Property> clusterProps = engineConfig.getPropertiesWithValue("cluster");
  if (clusterProps.size() > 1) {
    throw new ContainerException("Only one cluster configuration allowed per engine");
  }
  if (UtilValidate.isNotEmpty(clusterProps)) {
    clusterProp = clusterProps.get(0);
    GroupChannel channel = new GroupChannel();
    channel.setChannelReceiver(prepareChannelReceiver(clusterProp));
    channel.setChannelSender(prepareChannelSender(clusterProp));
    channel.setMembershipService(prepareChannelMcastService(clusterProp));
    SimpleTcpCluster cluster = new SimpleTcpCluster();
    cluster.setClusterName(clusterProp.name);
    cluster.setManagerTemplate(prepareClusterManager(clusterProp));
    cluster.setChannel(channel);
    cluster.addValve(prepareClusterValve(clusterProp));
    host.setCluster(cluster);
    Debug.logInfo("Catalina Cluster [" + cluster.getClusterName() + "] configured for host - " + host.getName(), module);
  }
  return clusterProp;
}
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.tcpSimpleTcpClustergetClusterName

Javadoc

Return the name of the cluster that this Server is currently configured to operate within.

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
  • getLocalMember
    Return the member that represents this node.
  • getManagerName
  • messageReceived
  • register
  • registerClusterValve
    register all cluster valve to host or engine
  • register,
  • registerClusterValve,
  • registerMember,
  • send,
  • setState,
  • unregister,
  • unregisterClusterValve,
  • unregisterMember,
  • findClusterListeners

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JComboBox (javax.swing)
  • Top plugins for Android Studio
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