Author: kfujino Date: Wed Apr 20 05:02:56 2016 New Revision: 1740046 URL: http://svn.apache.org/viewvc?rev=1740046&view=rev Log: Change the channel field to protected.
Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java Wed Apr 20 05:02:56 2016 @@ -154,11 +154,11 @@ public class ChannelCoordinator extends if ( Channel.SND_RX_SEQ==(svc & Channel.SND_RX_SEQ) ) { clusterReceiver.setMessageListener(this); if (clusterReceiver instanceof ReceiverBase) { - ((ReceiverBase)clusterReceiver).setChannel(getChannel()); + ((ReceiverBase)clusterReceiver).setChannel(channel); } clusterReceiver.start(); //synchronize, big time FIXME - Member localMember = getChannel().getLocalMember(false); + Member localMember = channel.getLocalMember(false); if (localMember instanceof StaticMember) { // static member StaticMember staticMember = (StaticMember)localMember; @@ -176,7 +176,7 @@ public class ChannelCoordinator extends } if ( Channel.SND_TX_SEQ==(svc & Channel.SND_TX_SEQ) ) { if (clusterSender instanceof ReplicationTransmitter) { - ((ReplicationTransmitter)clusterSender).setChannel(getChannel()); + ((ReplicationTransmitter)clusterSender).setChannel(channel); } clusterSender.start(); valid = true; @@ -186,14 +186,14 @@ public class ChannelCoordinator extends membershipService.setMembershipListener(this); if (membershipService instanceof McastService) { ((McastService)membershipService).setMessageListener(this); - ((McastService)membershipService).setChannel(getChannel()); + ((McastService)membershipService).setChannel(channel); } membershipService.start(MembershipService.MBR_RX); valid = true; } if ( Channel.MBR_TX_SEQ==(svc & Channel.MBR_TX_SEQ) ) { if (membershipService instanceof McastService) { - ((McastService)membershipService).setChannel(getChannel()); + ((McastService)membershipService).setChannel(channel); } membershipService.start(MembershipService.MBR_TX); valid = true; Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java Wed Apr 20 05:02:56 2016 @@ -29,7 +29,7 @@ public abstract class ChannelInterceptor private ChannelInterceptor next; private ChannelInterceptor previous; - private Channel channel; + protected Channel channel; //default value, always process protected int optionFlag = 0; Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java Wed Apr 20 05:02:56 2016 @@ -136,8 +136,8 @@ public class MessageDispatchInterceptor return; } String channelName = ""; - if (getChannel() instanceof GroupChannel && ((GroupChannel)getChannel()).getName() != null) { - channelName = "[" + ((GroupChannel)getChannel()).getName() + "]"; + if (channel instanceof GroupChannel && ((GroupChannel)channel).getName() != null) { + channelName = "[" + ((GroupChannel)channel).getName() + "]"; } executor = ExecutorFactory.newThreadPool(maxSpareThreads, maxThreads, keepAliveTime, TimeUnit.MILLISECONDS, Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java Wed Apr 20 05:02:56 2016 @@ -72,9 +72,8 @@ public class TcpPingInterceptor extends thread = new PingThread(); thread.setDaemon(true); String channelName = ""; - if (getChannel() instanceof GroupChannel - && ((GroupChannel)getChannel()).getName() != null) { - channelName = "[" + ((GroupChannel)getChannel()).getName() + "]"; + if (channel instanceof GroupChannel && ((GroupChannel)channel).getName() != null) { + channelName = "[" + ((GroupChannel)channel).getName() + "]"; } thread.setName("TcpPingInterceptor.PingThread" + channelName +"-"+cnt.addAndGet(1)); thread.start(); Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java Wed Apr 20 05:02:56 2016 @@ -77,7 +77,7 @@ public class McastService implements Mem protected byte[] domain; - private Channel channel; + protected Channel channel; /** * Create a membership service. Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java Wed Apr 20 05:02:56 2016 @@ -157,7 +157,7 @@ public class McastServiceImpl */ protected final boolean localLoopbackDisabled; - private Channel channel; + protected Channel channel; /** * Create a new mcast service impl @@ -620,9 +620,9 @@ public class McastServiceImpl Thread t = new RecoveryThread(parent); String channelName = ""; - if (parent.getChannel() instanceof GroupChannel - && ((GroupChannel)parent.getChannel()).getName() != null) { - channelName = "[" + ((GroupChannel)parent.getChannel()).getName() + "]"; + if (parent.channel instanceof GroupChannel + && ((GroupChannel)parent.channel).getName() != null) { + channelName = "[" + ((GroupChannel)parent.channel).getName() + "]"; } t.setName("Tribes-MembershipRecovery" + channelName); t.setDaemon(true); Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java Wed Apr 20 05:02:56 2016 @@ -81,7 +81,7 @@ public abstract class ReceiverBase imple private long maxIdleTime = 60000; private ExecutorService executor; - private Channel channel; + protected Channel channel; public ReceiverBase() { } Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java Wed Apr 20 05:02:56 2016 @@ -30,7 +30,7 @@ import org.apache.catalina.tribes.transp */ public class ReplicationTransmitter implements ChannelSender { - private Channel channel; + protected Channel channel; public ReplicationTransmitter() { } Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java Wed Apr 20 05:02:56 2016 @@ -56,9 +56,8 @@ public class BioReceiver extends Receive getBind(); bind(); String channelName = ""; - if (getChannel() instanceof GroupChannel - && ((GroupChannel)getChannel()).getName() != null) { - channelName = "[" + ((GroupChannel)getChannel()).getName() + "]"; + if (channel instanceof GroupChannel && ((GroupChannel)channel).getName() != null) { + channelName = "[" + ((GroupChannel)channel).getName() + "]"; } Thread t = new Thread(this, "BioReceiver" + channelName); t.setDaemon(true); Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1740046&r1=1740045&r2=1740046&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Wed Apr 20 05:02:56 2016 @@ -91,9 +91,8 @@ public class NioReceiver extends Receive getBind(); bind(); String channelName = ""; - if (getChannel() instanceof GroupChannel - && ((GroupChannel)getChannel()).getName() != null) { - channelName = "[" + ((GroupChannel)getChannel()).getName() + "]"; + if (channel instanceof GroupChannel && ((GroupChannel)channel).getName() != null) { + channelName = "[" + ((GroupChannel)channel).getName() + "]"; } Thread t = new Thread(this, "NioReceiver" + channelName); t.setDaemon(true); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org