# HG changeset patch # User sugi # Date 1422024723 -32400 # Node ID b6e663a9a372492f26013528d1a787d4525d609b # Parent c9175c3109879a0ee0312f6f75d0979436fbdd25 refactor diff -r c9175c310987 -r b6e663a9a372 src/main/java/alice/codesegment/OutputDataSegment.java --- a/src/main/java/alice/codesegment/OutputDataSegment.java Fri Jan 23 14:51:58 2015 +0900 +++ b/src/main/java/alice/codesegment/OutputDataSegment.java Fri Jan 23 23:52:03 2015 +0900 @@ -61,13 +61,8 @@ } public void put(String managerKey, String key, Object val) { - if (!managerKey.equals("local") && DataSegment.contains(managerKey)){ - ReceiveData rData = new ReceiveData(val, false, false); - SendOption option = new SendOption(false, compressFlag()); - DataSegment.get(managerKey).put(key, rData, option); - } else { - put(key, val); - } + ReceiveData rData = new ReceiveData(val, false, false); + put(managerKey, key, rData); } public void quickPut(String managerKey, String key, ReceiveData rData) { @@ -80,13 +75,8 @@ } public void quickPut(String managerKey, String key, Object val) { - if (!managerKey.equals("local") && DataSegment.contains(managerKey)){ - ReceiveData rData = new ReceiveData(val, false, false); - SendOption option = new SendOption(true, compressFlag()); - DataSegment.get(managerKey).put(key, rData, option); - } else { - put(key, val); - } + ReceiveData rData = new ReceiveData(val, false, false); + quickPut(managerKey, key, rData); } public void update(String managerKey, String key, ReceiveData rData) { @@ -99,13 +89,8 @@ } public void update(String managerKey, String key, Object val) { - if (!managerKey.equals("local") && DataSegment.contains(managerKey)){ - ReceiveData rData = new ReceiveData(val, false, false); - SendOption option = new SendOption(false, compressFlag()); - DataSegment.get(managerKey).update(key, rData, option); - } else { - update(key, val); - } + ReceiveData rData = new ReceiveData(val, false, false); + update(managerKey, key, rData); } public void quickUpdate(String managerKey, String key, ReceiveData rData) { @@ -118,13 +103,8 @@ } public void quickUpdate(String managerKey, String key, Object val) { - if (!managerKey.equals("local") && DataSegment.contains(managerKey)){ - ReceiveData rData = new ReceiveData(val, false, false); - SendOption option = new SendOption(true, compressFlag()); - DataSegment.get(managerKey).update(key, rData, option); - } else { - update(key, val); - } + ReceiveData rData = new ReceiveData(val, false, false); + quickUpdate(managerKey, key, rData); } /**