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

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

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

origin: codefollower/Tomcat-Research

protected void checkDefaults() {
  if ( clusterListeners.size() == 0 ) {
    addClusterListener(new ClusterSessionListener());
  }
  if ( valves.size() == 0 ) {
    addValve(new JvmRouteBinderValve());
    addValve(new ReplicationValve());
  }
  if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
  if ( channel == null ) channel = new GroupChannel();
  if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
    channel.addInterceptor(new MessageDispatch15Interceptor());
    channel.addInterceptor(new TcpFailureDetector());
  }
}
origin: org.apache.tomcat/tomcat-catalina-ha

protected void checkDefaults() {
  if ( clusterListeners.size() == 0 && managerTemplate instanceof DeltaManager ) {
    addClusterListener(new ClusterSessionListener());
  }
  if ( valves.size() == 0 ) {
    addValve(new JvmRouteBinderValve());
    addValve(new ReplicationValve());
  }
  if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
  if ( channel == null ) channel = new GroupChannel();
  if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
    channel.addInterceptor(new MessageDispatchInterceptor());
    channel.addInterceptor(new TcpFailureDetector());
  }
  if (heartbeatBackgroundEnabled) channel.setHeartbeat(false);
}
origin: org.apache.geronimo.ext.tomcat/catalina-ha

protected void checkDefaults() {
  if ( clusterListeners.size() == 0 ) {
    addClusterListener(new JvmRouteSessionIDBinderListener()); 
    addClusterListener(new ClusterSessionListener());
  }
  if ( valves.size() == 0 ) {
    addValve(new JvmRouteBinderValve());
    addValve(new ReplicationValve());
  }
  if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
  if ( channel == null ) channel = new GroupChannel();
  if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
    channel.addInterceptor(new MessageDispatch15Interceptor());
    channel.addInterceptor(new TcpFailureDetector());
  }
}
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;
}
org.apache.catalina.ha.tcpSimpleTcpClusteraddValve

Javadoc

Add cluster valve Cluster Valves are only add to container when cluster is started!

Popular methods of SimpleTcpCluster

  • 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
  • registerClusterValve
    register all cluster valve to host or engine
  • register,
  • registerClusterValve,
  • registerMember,
  • send,
  • setState,
  • unregister,
  • unregisterClusterValve,
  • unregisterMember,
  • findClusterListeners

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Path (java.nio.file)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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