Mercurial > hg > Members > tatsuki > Alice
changeset 56:17f88fd202ae
refactor data segment
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Feb 2012 14:31:16 +0900 |
parents | 0c2ad7c70f4e |
children | 7fa9ddb31f64 |
files | src/alice/datasegment/DataSegmentManager.java src/alice/datasegment/LocalDataSegmentManager.java |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/datasegment/DataSegmentManager.java Tue Feb 07 19:34:50 2012 +0900 +++ b/src/alice/datasegment/DataSegmentManager.java Wed Feb 08 14:31:16 2012 +0900 @@ -11,7 +11,6 @@ public abstract class DataSegmentManager { - protected ConcurrentHashMap<String, DataSegmentKey> dataSegments = new ConcurrentHashMap<String, DataSegmentKey>(); protected ConcurrentHashMap<Integer, Command> seqHash = new ConcurrentHashMap<Integer, Command>(); public LinkedBlockingQueue<Command> replyQueue = new LinkedBlockingQueue<Command>(); protected AtomicInteger seq = new AtomicInteger(1);
--- a/src/alice/datasegment/LocalDataSegmentManager.java Tue Feb 07 19:34:50 2012 +0900 +++ b/src/alice/datasegment/LocalDataSegmentManager.java Wed Feb 08 14:31:16 2012 +0900 @@ -1,14 +1,16 @@ package alice.datasegment; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.log4j.Logger; import org.msgpack.type.Value; import alice.codesegment.CodeSegment; -import alice.datasegment.CommandType; public class LocalDataSegmentManager extends DataSegmentManager { - public String reverseKey = "local"; + private String reverseKey = "local"; + private ConcurrentHashMap<String, DataSegmentKey> dataSegments = new ConcurrentHashMap<String, DataSegmentKey>(); private Logger logger = Logger.getLogger("local");