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 at6 //7 // http://www.apache.org/licenses/LICENSE-2.08 //9 // Unless required by applicable law or agreed to in writing, software10 // 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 and13 // limitations under the License.14 15 modulehunt.gossip.model.SyncMessage;
16 17 importhunt.io.Common;
18 importhunt.collection.List;
19 importhunt.gossip.model.GossipDigest;
20 21 22 publicclassSyncMessage : Serializable {
23 privatestringcluster;
24 privateList!(GossipDigest) digestList;
25 26 publicthis() {
27 }
28 29 publicthis(stringcluster, List!(GossipDigest) digestList) {
30 this.cluster = cluster;
31 this.digestList = digestList;
32 }
33 34 publicstringgetCluster() {
35 returncluster;
36 }
37 38 publicvoidsetCluster(stringcluster) {
39 this.cluster = cluster;
40 }
41 42 publicList!(GossipDigest) getDigestList() {
43 returndigestList;
44 }
45 46 publicvoidsetDigestList(List!(GossipDigest) digestList) {
47 this.digestList = digestList;
48 }
49 50 override51 publicstringtoString() {
52 return"GossipDigestSyncMessage{" ~
53 "cluster='" ~ cluster ~ '\'' ~
54 ", digestList=" ~ digestList.toString ~
55 '}';
56 }
57 58 }