Mercurial > hg > Database > Alice
changeset 152:b23581a5243c working
minor change
author | sugi |
---|---|
date | Thu, 29 Nov 2012 16:29:58 +0900 |
parents | 98a1292ae8ef |
children | b6f997844747 |
files | src/alice/datasegment/Receiver.java src/alice/test/topology/share/ShareConfig.java |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/datasegment/Receiver.java Thu Nov 29 16:28:36 2012 +0900 +++ b/src/alice/datasegment/Receiver.java Thu Nov 29 16:29:58 2012 +0900 @@ -2,6 +2,7 @@ import java.io.IOException; +import org.msgpack.type.ArrayValue; import org.msgpack.type.Value; import org.msgpack.type.ValueType; @@ -89,6 +90,13 @@ return 0.0f; } + public ArrayValue asArray(){ + if (val.getType() == ValueType.ARRAY){ + return val.asArrayValue(); + } + return null; + } + public <T> T asClass(Class<T> clazz) { try { return SingletonMessage.getInstance().convert(val, clazz);
--- a/src/alice/test/topology/share/ShareConfig.java Thu Nov 29 16:28:36 2012 +0900 +++ b/src/alice/test/topology/share/ShareConfig.java Thu Nov 29 16:29:58 2012 +0900 @@ -1,6 +1,6 @@ package alice.test.topology.share; -import alice.topology.node.TopologyNodeConfig;; +import alice.topology.node.TopologyNodeConfig; public class ShareConfig extends TopologyNodeConfig {