ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/ha/ClusterManager.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/ha/ClusterManager.java
Status
scanned
Type
file
Name
ClusterManager.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
4061 (4.0 KB)
MD5
4aa9a6cf7d4f522e13d4e0262f8ce885
SHA1
43f840b680da023fe6cbd15fc814b5d114fc4cb4
SHA256
2a88a44fd7604335b7e9cff876c4051ba66117e6982374040330208b53f416fe
SHA512

      
    
SHA1_git
2b7ddb398901303f08c8bb24d2b7fddf524df5ff
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
ClusterManager.java | 4.0 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.ha; import java.io.IOException; import org.apache.catalina.Manager; import org.apache.catalina.tribes.io.ReplicationStream; /** * The common interface used by all cluster manager. This is so that we can have a more pluggable way of swapping * session managers for different algorithms. */ public interface ClusterManager extends Manager { /** * A message was received from another node, this is the callback method to implement if you are interested in * receiving replication messages. * * @param msg - the message received. */ void messageDataReceived(ClusterMessage msg); /** * When the request has been completed, the replication valve will notify the manager, and the manager will decide * whether any replication is needed or not. If there is a need for replication, the manager will create a session * message and that will be replicated. The cluster determines where it gets sent. * * @param sessionId - the sessionId that just completed. * * @return a SessionMessage to be sent. */ ClusterMessage requestCompleted(String sessionId); /** * When the manager expires session not tied to a request. The cluster will periodically ask for a list of sessions * that should expire and that should be sent across the wire. * * @return String[] The invalidated sessions */ String[] getInvalidatedSessions(); /** * Return the name of the manager, at host /context name and at engine hostname+/context. * * @return String * * @since 5.5.10 */ String getName(); /** * Set the name of the manager, at host /context name and at engine hostname+/context * * @param name The manager name * * @since 5.5.10 */ void setName(String name); /** * @return the cluster associated with this manager */ CatalinaCluster getCluster(); /** * Set the cluster associated with this manager. * * @param cluster the cluster */ void setCluster(CatalinaCluster cluster); /** * Open stream and use correct ClassLoader (Container), switching thread context class loader. * * @param data the data * * @return the object input stream * * @throws IOException An error occurred */ ReplicationStream getReplicationStream(byte[] data) throws IOException; /** * Open stream and use correct ClassLoader (Container), switching thread context class loader. * * @param data the data * @param offset the offset in the data array * @param length the data length * * @return the object input stream * * @throws IOException An error occurred */ ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException; /** * @return {@code true} if listeners are notified on replication */ boolean isNotifyListenersOnReplication(); /** * @return a clone of a template manager configuration */ ClusterManager cloneFromTemplate(); }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
25.11
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9