Author: kfujino
Date: Tue Apr 19 08:37:02 2016
New Revision: 1739863
URL: http://svn.apache.org/viewvc?rev=1739863&view=rev
Log:
Add name to channel in order to identify channels.
In tomcat cluster environment, it is set the cluster name + "-Channel" as
default value.
Modified:
tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/Channel.java
tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
Modified:
tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1739863&r1=1739862&r2=1739863&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
(original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
Tue Apr 19 08:37:02 2016
@@ -533,6 +533,7 @@ public class SimpleTcpCluster extends Li
registerClusterValve();
channel.addMembershipListener(this);
channel.addChannelListener(this);
+ channel.setName(getClusterName() + "-Channel");
channel.start(channelStartOptions);
if (clusterDeployer != null) clusterDeployer.start();
registerMember(channel.getLocalMember(false));
Modified: tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/Channel.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/Channel.java?rev=1739863&r1=1739862&r2=1739863&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/Channel.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/Channel.java Tue Apr
19 08:37:02 2016
@@ -357,5 +357,16 @@ public interface Channel {
*/
public Member getMember(Member mbr);
+ /**
+ * Return the name of this channel.
+ * @return channel name
+ */
+ public String getName();
+
+ /**
+ * Set the name of this channel
+ * @param name
+ */
+ public void setName(String name);
}
Modified:
tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=1739863&r1=1739862&r2=1739863&view=diff
==============================================================================
---
tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
(original)
+++
tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
Tue Apr 19 08:37:02 2016
@@ -106,6 +106,11 @@ public class GroupChannel extends Channe
protected boolean optionCheck = false;
/**
+ * the name of this channel.
+ */
+ protected String name = null;
+
+ /**
* Creates a GroupChannel. This constructor will also
* add the first interceptor in the GroupChannel.<br>
* The first interceptor is always the channel itself.
@@ -621,6 +626,16 @@ public class GroupChannel extends Channe
return heartbeatSleeptime;
}
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void setName(String name) {
+ this.name = name;
+ }
+
/**
*
* <p>Title: Interceptor Iterator</p>
Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1739863&r1=1739862&r2=1739863&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Tue Apr 19 08:37:02 2016
@@ -268,6 +268,11 @@
Add get/set method for the channel that is related to each Channel
services. (kfujino)
</add>
+ <add>
+ Add name to channel in order to identify channels. In tomcat cluster
+ environment, it is set the cluster name + "-Channel" as default value.
+ (kfujino)
+ </add>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]