# HG changeset patch # User Nobuyasu Oshiro # Date 1391107705 -32400 # Node ID eef85b5faa15beb4dbaf404edc19d28d81147250 # Parent 06cddf529325a0b045ebb76480bf45e6a826fb3a Removed renew atribute diff -r 06cddf529325 -r eef85b5faa15 src/main/java/app/bbs/NetworkJungleBulletinBoard.java --- 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 getMessages(String _boardName)