tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1142672 - /tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java
Date Mon, 04 Jul 2011 14:02:36 GMT
Author: kkolinko
Date: Mon Jul  4 14:02:36 2011
New Revision: 1142672

URL: http://svn.apache.org/viewvc?rev=1142672&view=rev
Log:
Add @Override annotation

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java?rev=1142672&r1=1142671&r2=1142672&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java Mon Jul  4 14:02:36
2011
@@ -121,6 +121,7 @@ public class McastService implements Mem
      * 8. tcpListenHost - the bind address of this member<BR>
      * @exception java.lang.IllegalArgumentException if a property is missing.
      */
+    @Override
     public void setProperties(Properties properties) {
         hasProperty(properties,"mcastPort");
         hasProperty(properties,"mcastAddress");
@@ -134,6 +135,7 @@ public class McastService implements Mem
     /**
      * Return the properties, see setProperties
      */
+    @Override
     public Properties getProperties() {
         return properties;
     }
@@ -148,6 +150,7 @@ public class McastService implements Mem
     /**
      * Return the local member
      */
+    @Override
     public Member getLocalMember(boolean alive) {
         if ( alive && localMember != null && impl != null) localMember.setMemberAliveTime(System.currentTimeMillis()-impl.getServiceStartTime());
         return localMember;
@@ -156,6 +159,7 @@ public class McastService implements Mem
     /**
      * Sets the local member properties for broadcasting
      */
+    @Override
     public void setLocalMemberProperties(String listenHost, int listenPort, int securePort,
int udpPort) {
         properties.setProperty("tcpListenHost",listenHost);
         properties.setProperty("tcpListenPort",String.valueOf(listenPort));
@@ -360,11 +364,13 @@ public class McastService implements Mem
      * Start broadcasting and listening to membership pings
      * @throws java.lang.Exception if a IO error occurs
      */
+    @Override
     public void start() throws java.lang.Exception {
         start(MembershipService.MBR_RX);
         start(MembershipService.MBR_TX);
     }
 
+    @Override
     public void start(int level) throws java.lang.Exception {
         hasProperty(properties,"mcastPort");
         hasProperty(properties,"mcastAddress");
@@ -447,6 +453,7 @@ public class McastService implements Mem
     /**
      * Stop broadcasting and listening to membership pings
      */
+    @Override
     public void stop(int svc) {
         try  {
             if ( impl != null && impl.stop(svc) ) impl = null;
@@ -459,6 +466,7 @@ public class McastService implements Mem
     /**
      * Return all the members by name
      */
+    @Override
     public String[] getMembersByName() {
         Member[] currentMembers = getMembers();
         String [] membernames ;
@@ -475,6 +483,7 @@ public class McastService implements Mem
     /**
      * Return the member by name
      */
+    @Override
     public Member findMemberByName(String name) {
         Member[] currentMembers = getMembers();
         for (int i = 0; i < currentMembers.length; i++) {
@@ -487,11 +496,13 @@ public class McastService implements Mem
     /**
      * has members?
      */
+    @Override
     public boolean hasMembers() {
        if ( impl == null || impl.membership == null ) return false;
        return impl.membership.hasMembers();
     }
 
+    @Override
     public Member getMember(Member mbr) {
         if ( impl == null || impl.membership == null ) return null;
         return impl.membership.getMember(mbr);
@@ -501,6 +512,7 @@ public class McastService implements Mem
      * Return all the members
      */
     protected static final Member[]EMPTY_MEMBERS = new Member[0];
+    @Override
     public Member[] getMembers() {
         if ( impl == null || impl.membership == null ) return EMPTY_MEMBERS;
         return impl.membership.getMembers();
@@ -510,6 +522,7 @@ public class McastService implements Mem
      * so calling this method twice will result in only the second listener being active.
      * @param listener The listener
      */
+    @Override
     public void setMembershipListener(MembershipListener listener) {
         this.listener = listener;
     }
@@ -524,10 +537,12 @@ public class McastService implements Mem
     /**
      * Remove the membership listener
      */
+    @Override
     public void removeMembershipListener(){
         listener = null;
     }
 
+    @Override
     public void memberAdded(Member member) {
         if ( listener!=null ) listener.memberAdded(member);
     }
@@ -536,18 +551,22 @@ public class McastService implements Mem
      * Callback from the impl when a new member has been received
      * @param member The member
      */
+    @Override
     public void memberDisappeared(Member member)
     {
         if ( listener!=null ) listener.memberDisappeared(member);
     }
     
+    @Override
     public void messageReceived(ChannelMessage msg) {
         if (msglistener!=null && msglistener.accept(msg)) msglistener.messageReceived(msg);

     }
     
+    @Override
     public boolean accept(ChannelMessage msg) {
         return true;
     }
+    @Override
     public void broadcast(ChannelMessage message) throws ChannelException {
         if (impl==null || (impl.startLevel & Channel.MBR_TX_SEQ)!=Channel.MBR_TX_SEQ
)
             throw new ChannelException("Multicast send is not started or enabled.");
@@ -626,6 +645,7 @@ public class McastService implements Mem
         properties.setProperty("mcastTTL", String.valueOf(mcastTTL));
     }
 
+    @Override
     public void setPayload(byte[] payload) {
         this.payload = payload;
         if ( localMember != null ) {
@@ -639,6 +659,7 @@ public class McastService implements Mem
         }
     }
 
+    @Override
     public void setDomain(byte[] domain) {
         this.domain = domain;
         if ( localMember != null ) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message