Mercurial > hg > Database > jungle-network
comparison src/alice/jungle/persistence/PersistentChangeList.java @ 86:bcaf28f8244d
Added PersistentChageList and PersistentJournalTest
author | one |
---|---|
date | Tue, 29 Oct 2013 16:52:12 +0900 |
parents | |
children | f142dd4abc74 |
comparison
equal
deleted
inserted
replaced
85:e641f559559c | 86:bcaf28f8244d |
---|---|
1 package alice.jungle.persistence; | |
2 | |
3 import java.util.Iterator; | |
4 | |
5 import alice.jungle.operations.NetworkTreeOperationLog; | |
6 | |
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeList; | |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.TreeOperation; | |
9 | |
10 public class PersistentChangeList implements ChangeList { | |
11 | |
12 public NetworkTreeOperationLog log; | |
13 public String treeName; | |
14 public String uuid; | |
15 | |
16 public PersistentChangeList(NetworkTreeOperationLog _log) { | |
17 log = _log; | |
18 treeName = _log.getTreeName(); | |
19 uuid = _log.getUUID(); | |
20 } | |
21 | |
22 public PersistentChangeList(PersistentChangeSet cs) { | |
23 treeName = cs.getTreeName(); | |
24 uuid = cs.uuid(); | |
25 log = new NetworkTreeOperationLog(cs.getChangeList()); | |
26 } | |
27 | |
28 @Override | |
29 public Iterator<TreeOperation> iterator() { | |
30 return log.iterator(); | |
31 } | |
32 | |
33 public NetworkTreeOperationLog getTreeOperationLog() { | |
34 return log; | |
35 } | |
36 | |
37 public String getTreeName() { | |
38 return treeName; | |
39 } | |
40 | |
41 public String getUUID() { | |
42 return uuid; | |
43 } | |
44 | |
45 | |
46 } |