Mercurial > hg > Database > Christie
comparison src/main/java/christie/topology/node/IncomingReverseKey.java @ 84:c0c29f989af3
update comment add
author | akahori |
---|---|
date | Sat, 15 Sep 2018 09:25:55 +0900 |
parents | 37601b98f0da |
children |
comparison
equal
deleted
inserted
replaced
83:2314c55534ef | 84:c0c29f989af3 |
---|---|
1 package christie.topology.node; | 1 package christie.topology.node; |
2 | 2 |
3 | 3 |
4 import christie.annotation.Peek; | |
5 import christie.annotation.Take; | 4 import christie.annotation.Take; |
6 import christie.codegear.CodeGear; | 5 import christie.codegear.CodeGear; |
7 import christie.codegear.CodeGearManager; | 6 import christie.codegear.CodeGearManager; |
8 import christie.daemon.IncomingTcpConnection; | |
9 | 7 |
8 | |
9 // pingを受け取るみたいなクラス. 相手がreverseNodeNameを送ってきたらreverseCountをプラスする | |
10 public class IncomingReverseKey extends CodeGear { | 10 public class IncomingReverseKey extends CodeGear { |
11 | 11 |
12 @Take | 12 @Take |
13 String reverseNodeName; | 13 String reverseNodeName; |
14 | 14 |
15 @Take | 15 @Take |
16 int reverseCount; | 16 int reverseCount; |
17 | 17 |
18 @Override | 18 @Override |
19 protected void run(CodeGearManager cgm) { | 19 protected void run(CodeGearManager cgm) { |
20 | |
21 reverseCount++; | 20 reverseCount++; |
22 getLocalDGM().put( "reverseCount", reverseCount); | 21 getLocalDGM().put( "reverseCount", reverseCount); |
23 cgm.setup(new IncomingReverseKey()); | 22 cgm.setup(new IncomingReverseKey()); |
24 } | 23 } |
25 | 24 |