Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/IncomingReverseKey.java @ 602:8a9fd716c335 dispose
change topology class extends CodeSegment from MetaCodeSegment, Chat minor fix
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 03 May 2016 20:09:45 +0900 |
parents | 3284428f525e |
children |
line wrap: on
line source
package alice.topology.node; import alice.codesegment.CodeSegment; import alice.codesegment.MetaCodeSegment; import alice.datasegment.CommandType; import alice.datasegment.DataSegment; import alice.datasegment.Receiver; public class IncomingReverseKey extends CodeSegment { public Receiver reverseKey = ids.create(CommandType.TAKE); public Receiver reverseCount = ids.create(CommandType.PEEK); @Override public void run() { String reverseKey = this.reverseKey.asString(); String from = this.reverseKey.from; DataSegment.getAccept(from).setReverseKey(reverseKey); int reverseCount = this.reverseCount.asInteger(); reverseCount++; ods.update("local", "reverseCount", reverseCount); IncomingReverseKey cs = new IncomingReverseKey(); cs.reverseKey.setKey("local", "reverseKey"); cs.reverseCount.setKey("local", "reverseCount"); } }