View Javadoc

1   /*
2    * Copyright (c) 1998-2002 The Jgroup Team.
3    *
4    * This program is free software; you can redistribute it and/or modify
5    * it under the terms of the GNU Lesser General Public License version 2 as
6    * published by the Free Software Foundation.
7    *
8    * This program is distributed in the hope that it will be useful,
9    * but WITHOUT ANY WARRANTY; without even the implied warranty of
10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   * GNU Lesser General Public License for more details.
12   *
13   * You should have received a copy of the GNU Lesser General Public License
14   * along with this program; if not, write to the Free Software
15   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16   *
17   */
18  
19  package jgroup.relacs.mss;
20  
21  /**
22   *  The <code>MssTag</code> interface contains the tags used by the Mss.
23   *
24   *  @author Alberto Montresor
25   *  @author Salvatore Cammarrata
26   *  @author Hein Meling
27   *  @since Jgroup 0.1
28   */
29  public interface MssTag 
30  {
31  
32    public static final String[] TAGTYPE = new String[] {
33      "INVALID TAG",
34      "TOPOLOGY",
35      "ROUTING",
36      "FWDROUTING",
37      "IAMALIVE",
38      "SENT",
39      "JG",
40      "NACK",
41      "SENTNACK",
42      "REMOTENACK",
43      "SYN",
44      "ASYN",
45      "QSYN",
46      "LOCALFC",
47      "EXTERNFC",
48      "CONGESTION",
49      "PING_OBJECT"
50    };
51  
52    ////////////////////////////////////////////////////////////////////////////////////////////
53    // Topology Message Types
54    ////////////////////////////////////////////////////////////////////////////////////////////
55  
56    /** Common message tag for topology messages */
57    public static final byte TOPOLOGY   = 1;
58  
59    /** The topology msg has to be broadcast when received */
60    public static final byte ROUTING    = 2; 
61  
62    /** The topology msg should not be broadcast when received */
63    public static final byte FWDROUTING = 3;
64  
65    /** Local topology msg */
66    public static final byte IAMALIVE   = 4;
67  
68    /** The topology msg for the cluster is already sent */
69    public static final byte SENT       = 5;
70  
71  
72    ////////////////////////////////////////////////////////////////////////////////////////////
73    // Jgroup Related Message Types
74    ////////////////////////////////////////////////////////////////////////////////////////////
75  
76    /** JG message */
77    public static final byte JG         = 6;
78    public static final byte NOTLASTFRAGMENT = -1;
79  
80  
81    ////////////////////////////////////////////////////////////////////////////////////////////
82    // Negative Acknowledgement Message Types
83    ////////////////////////////////////////////////////////////////////////////////////////////
84  
85    /** NACK message types */
86    public static final byte NACK       = 7;
87    public static final byte SENTNACK   = 8;
88    public static final byte REMOTENACK = 9;
89  
90  
91    ////////////////////////////////////////////////////////////////////////////////////////////
92    // Synchronization Message Types
93    ////////////////////////////////////////////////////////////////////////////////////////////
94  
95    /** Synchronization message */
96    public static final byte SYN        = 10;
97  
98    /** Answer (reply) to a QSYN request */
99    public static final byte ASYN       = 11;
100 
101   /** Query (request) for synchronization */
102   public static final byte QSYN       = 12;
103 
104 
105   ////////////////////////////////////////////////////////////////////////////////////////////
106   // Flow Control Message Types
107   ////////////////////////////////////////////////////////////////////////////////////////////
108 
109   /** FC Message Type */
110   public static final byte LOCALFC    = 13;
111   public static final byte EXTERNFC   = 14;
112 
113 
114   ////////////////////////////////////////////////////////////////////////////////////////////
115   // Congestion Message Type
116   ////////////////////////////////////////////////////////////////////////////////////////////
117 
118   /** Message to indicate congestion */
119   public static final byte CONGESTION = 15;
120 
121   ////////////////////////////////////////////////////////////////////////////////////////////
122   // Ping request event
123   ////////////////////////////////////////////////////////////////////////////////////////////
124 
125   /** Message to indicate congestion */
126   public static final byte PING_OBJECT = 16;
127   
128 } // END MssTag