Mercurial > hg > Database > jungle-network
comparison src/alice/jungle/datasegment/store/operations/DefaultNodePathContainer.java @ 62:85bc7416ae02
modified some container using SingletonMessage
author | one |
---|---|
date | Fri, 19 Jul 2013 11:08:04 +0900 |
parents | 190f6a3bdab2 |
children | 89e39301ccaa |
comparison
equal
deleted
inserted
replaced
61:e871e8fc3f69 | 62:85bc7416ae02 |
---|---|
10 import org.msgpack.MessagePack; | 10 import org.msgpack.MessagePack; |
11 import org.msgpack.annotation.Message; | 11 import org.msgpack.annotation.Message; |
12 import org.msgpack.template.IntegerTemplate; | 12 import org.msgpack.template.IntegerTemplate; |
13 import org.msgpack.template.ListTemplate; | 13 import org.msgpack.template.ListTemplate; |
14 import org.msgpack.type.Value; | 14 import org.msgpack.type.Value; |
15 | |
16 import alice.codesegment.SingletonMessage; | |
15 | 17 |
16 @Message | 18 @Message |
17 public class DefaultNodePathContainer { | 19 public class DefaultNodePathContainer { |
18 | 20 |
19 public Value pathValue; | 21 public Value pathValue; |
39 for(Integer i : path) { | 41 for(Integer i : path) { |
40 list.add(i); | 42 list.add(i); |
41 } | 43 } |
42 /* Remove first Element(-1). */ | 44 /* Remove first Element(-1). */ |
43 list.remove(0); | 45 list.remove(0); |
44 msgpack.register(List.class, new ListTemplate(IntegerTemplate.getInstance())); | |
45 Value v = msgpack.unconvert(list); | 46 Value v = msgpack.unconvert(list); |
46 pathValue = v; | 47 pathValue = v; |
47 } | 48 } |
48 | 49 |
49 public DefaultNodePath convert() throws IOException { | 50 public DefaultNodePath convert() throws IOException { |