01: /*
02: * Copyright 1999,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.apache.catalina.cluster;
17:
18: import java.io.Serializable;
19:
20: public interface ClusterMessage extends Serializable {
21: /**
22: * Get the address that this message originated from. This would be set
23: * if the message was being relayed from a host other than the one
24: * that originally sent it.
25: */
26: public Member getAddress();
27:
28: /**
29: * Called by the cluster before sending it to the other
30: * nodes
31: * @param member Member
32: */
33: public void setAddress(Member member);
34:
35: /**
36: * Timestamp message
37: * @return long
38: */
39: public long getTimestamp();
40:
41: /**
42: * Called by the cluster before sending out
43: * the message
44: * @param timestamp long
45: */
46: public void setTimestamp(long timestamp);
47:
48: /**
49: * Each message must have a unique ID, in case of using async replication,
50: * and a smart queue, this id is used to replace messages not yet sent
51: * @return String
52: */
53: public String getUniqueId();
54:
55: }
|