Mercurial > hg > Database > jungle-network
changeset 81:b9dd8ec0e66e
Added NetworkJournal
author | one |
---|---|
date | Wed, 16 Oct 2013 19:57:18 +0900 |
parents | 3f8ec40d536a |
children | 60d28fedcbf2 |
files | src/alice/jungle/operations/NetworkTreeOperation.java src/alice/jungle/persistence/NetworkJournal.java |
diffstat | 2 files changed, 54 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/jungle/operations/NetworkTreeOperation.java Wed Oct 16 19:38:56 2013 +0900 +++ b/src/alice/jungle/operations/NetworkTreeOperation.java Wed Oct 16 19:57:18 2013 +0900 @@ -37,6 +37,11 @@ operation = new NetworkNodeOperation(_op); } + public NetworkTreeOperation(NodePath _p, NetworkNodeOperation _op) { + path = new NetworkNodePath(_p); + operation = _op; + } + public NetworkTreeOperation(NetworkNodePath _p, NetworkNodeOperation _op) { path = _p; operation = _op;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/alice/jungle/persistence/NetworkJournal.java Wed Oct 16 19:57:18 2013 +0900 @@ -0,0 +1,49 @@ +package alice.jungle.persistence; + +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeList; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeListReader; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeListWriter; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.Journal; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.Result; + +public class NetworkJournal implements Journal { + + private static final NetworkChangeListWriter WRITER = new NetworkChangeListWriter(); + private static final NetworkChangeListReader READER = new NetworkChangeListReader(); + @Override + public ChangeListReader getReader() { + return READER; + } + @Override + public ChangeListWriter getWriter() { + return WRITER; + } + + private static class NetworkChangeListWriter implements ChangeListWriter + { + @Override + public Result write(ChangeList _operations) + { + + return Result.SUCCESS; + } +e + } + + + private static class NetworkChangeListReader implements ChangeListReader + { + @Override + public ChangeListReader newReader() + { + return this; + } + + @Override + public ChangeList read() + { + return null; + } + + } +}