Mercurial > hg > Members > tatsuki > Alice
changeset 297:f51ea581b0ff
add quick method
author | sugi |
---|---|
date | Tue, 22 Oct 2013 17:09:04 +0900 |
parents | 51ccd5480a86 |
children | 4fe924c9f504 |
files | src/alice/codesegment/OutputDataSegment.java |
diffstat | 1 files changed, 30 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/codesegment/OutputDataSegment.java Tue Oct 22 16:58:57 2013 +0900 +++ b/src/alice/codesegment/OutputDataSegment.java Tue Oct 22 17:09:04 2013 +0900 @@ -14,26 +14,50 @@ DataSegment.getLocal().put(receiver.key, receiver.getObj()); } - public <T> void put(String key, T val) { + public void put(String key, Object val) { DataSegment.getLocal().put(key, val); } - public <T> void update(String key, T val) { + public void quickPut(String key, Object val) { + put(key, val); + } + + public void update(String key, Object val) { DataSegment.getLocal().update(key, val); } + public void quickuUpdate(String key, Object val) { + update(key, val); + } + /** * for remote */ - public <T> void put(String managerKey, String key, T val) { + public void put(String managerKey, String key, Object val) { if (!managerKey.equals("local")){ - DataSegment.get(managerKey).put(key, val); + DataSegment.get(managerKey).put(key,val); } else { put(key, val); } } - public <T> void update(String managerKey, String key, T val) { + public void quickPut(String managerKey, String key, Object val) { + if (!managerKey.equals("local")){ + DataSegment.get(managerKey).quickPut(key, val); + } else { + put(key, val); + } + } + + public void update(String managerKey, String key, Object val) { + if (!managerKey.equals("local")){ + DataSegment.get(managerKey).update(key, val); + } else { + update(key, val); + } + } + + public void quickUpdate(String managerKey, String key, Object val) { if (!managerKey.equals("local")){ DataSegment.get(managerKey).update(key, val); } else { @@ -60,5 +84,5 @@ public void close(String managerKey) { DataSegment.get(managerKey).close(); } - + }