Mercurial > hg > Members > tatsuki > Alice
view src/main/java/alice/topology/node/IncomingReverseKey.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children |
line wrap: on
line source
package alice.topology.node; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.DataSegment; import alice.datasegment.Receiver; import org.msgpack.type.Value; 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 = ((Value)this.reverseKey.getVal()).asRawValue().getString(); String from = this.reverseKey.from; DataSegment.getAccept(from).reverseKey = 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"); } }