Mercurial > hg > Database > Alice
changeset 449:09a80f83c605 dispose
add Serialized and compressed flag on protocol header
author | sugi |
---|---|
date | Tue, 28 Oct 2014 00:24:34 +0900 |
parents | 4840d0e2b605 |
children | 5b14d0b60201 |
files | src/main/java/alice/daemon/CommandMessage.java src/main/java/alice/daemon/IncomingTcpConnection.java src/main/java/alice/daemon/IncomingUdpConnection.java |
diffstat | 3 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/daemon/CommandMessage.java Tue Oct 28 00:04:04 2014 +0900 +++ b/src/main/java/alice/daemon/CommandMessage.java Tue Oct 28 00:24:34 2014 +0900 @@ -8,15 +8,17 @@ public int index; public int seq; public String key; - public boolean flag; - + public boolean quickFlag; + public boolean serializedFlag; + public boolean compressedFlag; + public CommandMessage() {} - public CommandMessage(int type, int index, int seq, String key, boolean flag) { + public CommandMessage(int type, int index, int seq, String key, boolean qFlag) { this.type = type; this.index = index; this.seq = seq; this.key = key; - this.flag = flag; + this.quickFlag = qFlag; } }
--- a/src/main/java/alice/daemon/IncomingTcpConnection.java Tue Oct 28 00:04:04 2014 +0900 +++ b/src/main/java/alice/daemon/IncomingTcpConnection.java Tue Oct 28 00:24:34 2014 +0900 @@ -65,7 +65,7 @@ case PEEK: case TAKE: cmd = new Command(type, null, null, null, msg.index, msg.seq, null, null, connection); - cmd.setQuickFlag(msg.flag); + cmd.setQuickFlag(msg.quickFlag); lmanager.getDataSegmentKey(msg.key).runCommand(cmd); break; case REMOVE:
--- a/src/main/java/alice/daemon/IncomingUdpConnection.java Tue Oct 28 00:04:04 2014 +0900 +++ b/src/main/java/alice/daemon/IncomingUdpConnection.java Tue Oct 28 00:24:34 2014 +0900 @@ -53,7 +53,7 @@ case PEEK: case TAKE: cmd = new Command(type, null, null, null, msg.index, msg.seq, null, null ,sender); - cmd.setQuickFlag(msg.flag); + cmd.setQuickFlag(msg.quickFlag); getLocalDataSegmentManager().getDataSegmentKey(msg.key).runCommand(cmd); break; case REMOVE: