Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 34:ab561ead04d2
clean up
author | Shoshi TAMAKI |
---|---|
date | Wed, 23 Jan 2013 14:12:08 +0900 |
parents | 9f8b91265c3e |
children | cf958638a471 |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/persistent/DefaultJournal.java |
diffstat | 1 files changed, 3 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/persistent/DefaultJournal.java Wed Jan 23 13:49:20 2013 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/persistent/DefaultJournal.java Wed Jan 23 14:12:08 2013 +0900 @@ -96,8 +96,9 @@ ByteBuffer readBuf = ch.map(MapMode.READ_ONLY,0,READ_BUFFER_SIZE); ByteBuffer writeBuf = ch.map(MapMode.READ_WRITE,length,WRITE_BUFFER_SIZE); - ChangeListReader reader = new DefaultChangeListReader(ch); - ChangeListWriter writer = new DefaultChangeListWriter(ch); + // TODO : from here + //ChangeListReader reader = new DefaultChangeListReader(ch); + //ChangeListWriter writer = new DefaultChangeListWriter(ch); }catch(FileNotFoundException _e){ _e.printStackTrace(); @@ -108,11 +109,6 @@ return null; } - private static class Writer implements ChangeListWriter - { - - } - @Override public ChangeListReader getReader() { @@ -129,41 +125,4 @@ { T parse(String _line); } - - public static enum TagID - { - APPEND_CHILD(from16(0x05)), - DELETE_CHILD(from16(0x04)), - PUT_ATTRIBUTE(from16(0x03)), - DELETE_ATTRIBUTE(from16(0x02)), - COMMIT(from16(0x01)); - - public static ByteBuffer from16(int... _is) - { - ByteBuffer buf = ByteBuffer.allocate(_is.length); - for(int i : _is){ - buf.put((byte)i); - } - - buf.rewind(); - return buf; - } - - private final ByteBuffer id; - - public TagID(ByteBuffer _id) - { - id = _id; - } - - public ByteBuffer getID() - { - return id; - } - }; - - private static interface Parser - { - public Either<Erorr,Object> parse(ByteBuffer _buf); - } }