Mercurial > hg > Database > jungle-network
changeset 150:eef85b5faa15 jungle-network
Removed renew atribute
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2014 03:48:25 +0900 |
parents | 06cddf529325 |
children | cc4c1399158c |
files | src/main/java/app/bbs/NetworkJungleBulletinBoard.java |
diffstat | 1 files changed, 4 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/app/bbs/NetworkJungleBulletinBoard.java Tue Jan 28 11:30:47 2014 +0900 +++ b/src/main/java/app/bbs/NetworkJungleBulletinBoard.java Fri Jan 31 03:48:25 2014 +0900 @@ -35,6 +35,7 @@ private final String LOG_DIR; private Boolean persistentFlag; private AtomicInteger requestCounter; + private long renewTime; private NetworkJungleBulletinBoard(String _uuid, NetworkJournal _journal) { @@ -44,6 +45,7 @@ persistentFlag = false; requestCounter = BulletinBoardJungleManager.getRequestCounter(); LOG_DIR = "./log"; + renewTime = 0; } public NetworkJungleBulletinBoard(String _uuid) @@ -131,15 +133,7 @@ } public long getRenewTime(String _boardName) { - JungleTree tree = jungle.getTreeByName(_boardName); - ByteBuffer b = tree.getRootNode().getAttributes().get("renewtime"); - long timestamp; - if (b == null) { - timestamp = 0; - } else { - timestamp = b.getLong(0); - } - return timestamp; + return renewTime; } @@ -203,13 +197,6 @@ } either.b().success(); - /* - * Record latest renew time - */ - editor = tree.getLocalTreeEditor(); - either = editor.putAttribute(root, "renewtime", tBuffer); - either.b().success(); - } public void createBoardMessage(final String _board,final String _author,final String _message,final String _editKey) @@ -254,16 +241,6 @@ either = editor.success(); }while(either.isA()); - /* - * Record latest renew time - */ - DefaultNodePath root = new DefaultNodePath(); - do { - JungleTreeEditor editor = tree.getLocalTreeEditor(); - either = editor.putAttribute(root, "renewtime", tBuffer); - either = either.b().success(); - }while(either.isA()); - } @@ -296,17 +273,7 @@ editor = either.b(); either = editor.success(); }while(either.isA()); - /* - * Record latest renew time - */ - DefaultNodePath root = new DefaultNodePath(); - do { - JungleTreeEditor editor = tree.getLocalTreeEditor(); - either = editor.putAttribute(root, "renewtime", tBuffer); - either = either.b().success(); - }while(either.isA()); - - + renewTime = timestamp; } public Iterable<BoardMessage> getMessages(String _boardName)