Mercurial > hg > Members > tatsuki > Alice
view src/main/java/alice/test/topology/share/AutoIncrement.java @ 393:38021fceabef draft multicast
test commit
author | tatsuki |
---|---|
date | Tue, 17 Jun 2014 17:39:47 +0900 |
parents | 8f71c3e6f11d |
children |
line wrap: on
line source
package alice.test.topology.share; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class AutoIncrement extends CodeSegment { public Receiver position = ids.create(CommandType.PEEK); public AutoIncrement(String key,int index){ this.position.setKey(key, index); } @Override public void run() { synchronized(this){ try { wait(50); } catch (InterruptedException e) { e.printStackTrace(); } } ods.update(position.key, new DataInfo(System.nanoTime())); new AutoIncrement(position.key ,position.index); } }