Mercurial > hg > Database > jungle-network
changeset 92:e95faa202b4f
Modified NetworkDefaultJungleTreeEditor class. Removed uuid and serverUpdater fields
author | one |
---|---|
date | Mon, 11 Nov 2013 19:35:22 +0900 |
parents | 2c7b3f2b2ee1 |
children | 75cf01a430a6 |
files | src/alice/jungle/transaction/NetworkDefaultJungleTree.java src/alice/jungle/transaction/NetworkDefaultJungleTreeEditor.java src/jungle/app/bbs/NetworkJungleBulletinBoard.java |
diffstat | 3 files changed, 10 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/jungle/transaction/NetworkDefaultJungleTree.java Mon Nov 11 19:22:47 2013 +0900 +++ b/src/alice/jungle/transaction/NetworkDefaultJungleTree.java Mon Nov 11 19:35:22 2013 +0900 @@ -32,7 +32,7 @@ TreeContext<T> tc = repository.get(); NetworkTransactionManager<T> txManager = new NetworkTransactionManager<T>(treeName, writer,tc,repository,uuid); T root = tc.getTreeNode(); - return new NetworkDefaultJungleTreeEditor<T>(uuid, treeName, root,txManager,editor); + return new NetworkDefaultJungleTreeEditor<T>(treeName, root,txManager,editor); } @Override
--- a/src/alice/jungle/transaction/NetworkDefaultJungleTreeEditor.java Mon Nov 11 19:22:47 2013 +0900 +++ b/src/alice/jungle/transaction/NetworkDefaultJungleTreeEditor.java Mon Nov 11 19:35:22 2013 +0900 @@ -30,19 +30,17 @@ private final TransactionManager<T> txManager; private final T root; + private final TreeEditor editor; private final String treeName; - private final TreeEditor editor; private final TreeOperationLog log; - private final String uuid; - public NetworkDefaultJungleTreeEditor(String _uuid, String _treeName, T _root,TransactionManager<T> _txManager,TreeEditor _editor) + public NetworkDefaultJungleTreeEditor(String _treeName, T _root,TransactionManager<T> _txManager,TreeEditor _editor) { - this(_uuid, _treeName, _root,_txManager,_editor,new DefaultTreeOperationLog()); + this(_treeName, _root,_txManager,_editor,new DefaultTreeOperationLog()); } - public NetworkDefaultJungleTreeEditor(String _uuid, String _treeName, T _root,TransactionManager<T> _txManager,TreeEditor _editor, TreeOperationLog _log) + public NetworkDefaultJungleTreeEditor(String _treeName, T _root,TransactionManager<T> _txManager,TreeEditor _editor, TreeOperationLog _log) { - uuid = _uuid; treeName = _treeName; root = _root; txManager = _txManager; @@ -72,7 +70,7 @@ DefaultTreeOperationLog treeOperationLog = new DefaultTreeOperationLog(iterable,newLog.length()); TreeOperationLog newTreeOpLog = log.append(treeOperationLog); - JungleTreeEditor newEditor = new NetworkDefaultJungleTreeEditor<T>(uuid, treeName, newNode,txManager,editor,newTreeOpLog); + JungleTreeEditor newEditor = new NetworkDefaultJungleTreeEditor<T>(treeName, newNode,txManager,editor,newTreeOpLog); return DefaultEither.newB(newEditor); } @@ -119,7 +117,7 @@ } TransactionManager<T> newTxManager = either.b(); - JungleTreeEditor newTreeEditor = new NetworkDefaultJungleTreeEditor<T>(uuid, treeName, root,newTxManager,editor); + JungleTreeEditor newTreeEditor = new NetworkDefaultJungleTreeEditor<T>(treeName, root,newTxManager,editor); return DefaultEither.newB(newTreeEditor); } @@ -142,16 +140,11 @@ return root.getAsNode(); } - public TreeOperationLog getTreeOperationLog() { - return log; - } - public String getTreeName() { return treeName; } - public String getUpdaterName() { - return uuid; + public TreeOperationLog getTreeOperationLog() { + return log; } - }
--- a/src/jungle/app/bbs/NetworkJungleBulletinBoard.java Mon Nov 11 19:22:47 2013 +0900 +++ b/src/jungle/app/bbs/NetworkJungleBulletinBoard.java Mon Nov 11 19:35:22 2013 +0900 @@ -228,7 +228,7 @@ private void putTreeOperationLog(NetworkDefaultJungleTreeEditor<DefaultTreeNode> editor, long timestamp) throws IOException { String uuid = editor.getID(); String treeName = editor.getTreeName(); - String updaterName = editor.getUpdaterName(); + String updaterName = editor.getID(); String revision = editor.getRevision(); Iterable<TreeOperation> log = editor.getTreeOperationLog(); putDataSegment(uuid, treeName, updaterName, log, revision, timestamp);