write phase two - update

This commit is contained in:
lyr90329 2014-08-05 15:37:29 +08:00
parent d850d33011
commit 4d06451a92
1 changed files with 19 additions and 0 deletions

View File

@ -481,6 +481,25 @@ public class memSession implements Runnable
}
}
break;
case nm_write_2:
{
nm_write_2 msgLite = msg.getMessageLite();
boolean res = client.set(msgLite.getKey(), msgLite.getValue());
if(res)
{
if(removeLock(msgLite.getKey()) == false)
{
System.err.println("write 2 remove lock fail");
}
}
else
{
setLockState(msgLite.getKey(), LockKey.badLock);
System.err.println("write_2 fail");
}
}
break;
default:
System.err.println(msg.getMsgID().toString());
break;