1 // Copyright (C) 2018-2019 HuntLabs. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 module hunt.gossip.model.SyncMessage;
16 
17 import hunt.io.Common;
18 import hunt.collection.List;
19 import hunt.gossip.model.GossipDigest;
20 
21 
22 public class SyncMessage : Serializable {
23     private string cluster;
24     private List!(GossipDigest) digestList;
25 
26     public this() {
27     }
28 
29     public this(string cluster, List!(GossipDigest) digestList) {
30         this.cluster = cluster;
31         this.digestList = digestList;
32     }
33 
34     public string getCluster() {
35         return cluster;
36     }
37 
38     public void setCluster(string cluster) {
39         this.cluster = cluster;
40     }
41 
42     public List!(GossipDigest) getDigestList() {
43         return digestList;
44     }
45 
46     public void setDigestList(List!(GossipDigest) digestList) {
47         this.digestList = digestList;
48     }
49 
50     override
51     public string toString() {
52         return "GossipDigestSyncMessage{" ~
53                 "cluster='" ~ cluster ~ '\'' ~
54                 ", digestList=" ~ digestList.toString ~
55                 '}';
56     }
57 
58 }