Mercurial > hg > Database > Alice
changeset 512:84614ab9b758 dispose
remove no need method
author | sugi |
---|---|
date | Fri, 09 Jan 2015 16:34:15 +0900 |
parents | ea3f9fc4f0ce |
children | 6a9886c13f45 |
files | src/main/java/alice/daemon/IncomingTcpConnection.java |
diffstat | 1 files changed, 2 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/daemon/IncomingTcpConnection.java Fri Jan 09 16:15:16 2015 +0900 +++ b/src/main/java/alice/daemon/IncomingTcpConnection.java Fri Jan 09 16:34:15 2015 +0900 @@ -58,7 +58,7 @@ switch (type) { case UPDATE: case PUT: - rData = new ReceiveData(getSerializedByteArray(unpacker), msg.compressed, msg.serialized); + rData = new ReceiveData(unpacker.getSerializedByteArray(unpacker.readInt()), msg.compressed, msg.serialized); if (msg.setTime) { rData.setTime = true; rData.time = msg.time; @@ -79,7 +79,7 @@ break; case REPLY: cmd = manager.getAndRemoveCmd(msg.seq); - rData = new ReceiveData(getSerializedByteArray(unpacker), msg.compressed, msg.serialized); + rData = new ReceiveData(unpacker.getSerializedByteArray(unpacker.readInt()), msg.compressed, msg.serialized); Command rCmd = new Command(type, null, null, rData, msg.index, msg.seq, null, null, ""); cmd.cs.ids.reply(cmd.receiver, rCmd); break; @@ -102,19 +102,6 @@ return; } } - - } - - private byte[] getSerializedByteArray(Unpacker unpacker) { - int len; - byte[] b = null; - try { - len = unpacker.readInt(); - b = unpacker.getSerializedByteArray(len); - } catch (IOException e) { - e.printStackTrace(); - } - return b; } public void setReverseKey(String name) {