Mercurial > hg > Database > jungle-network
comparison src/main/java/alice/jungle/operations/NetworkPutAttributeOperation.java @ 179:2828205bdc3a
fit JungleCore
author | tatsuki |
---|---|
date | Sat, 13 Sep 2014 12:54:02 +0900 |
parents | 6f104ab4eb81 |
children | 269bada9eedc |
comparison
equal
deleted
inserted
replaced
178:d6944d788121 | 179:2828205bdc3a |
---|---|
3 import java.nio.ByteBuffer; | 3 import java.nio.ByteBuffer; |
4 | 4 |
5 import org.msgpack.annotation.Message; | 5 import org.msgpack.annotation.Message; |
6 | 6 |
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command; | 7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command; |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; | |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation; | 9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation; |
9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.PutAttribute; | 10 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.PutAttribute; |
10 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; | 11 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; |
11 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; | 12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; |
13 import jp.ac.u_ryukyu.ie.cr.tatsuki.jungle.store.index.Logging; | |
12 @Message | 14 @Message |
13 public class NetworkPutAttributeOperation implements NodeOperation | 15 public class NetworkPutAttributeOperation implements NodeOperation |
14 { | 16 { |
15 | 17 |
16 /* MessagePack cannot handle final. | 18 /* MessagePack cannot handle final. |
37 public Command getCommand() | 39 public Command getCommand() |
38 { | 40 { |
39 return Command.PUT_ATTRIBUTE; | 41 return Command.PUT_ATTRIBUTE; |
40 } | 42 } |
41 | 43 |
42 /*@Override | 44 @Override |
43 public <T extends EditableNode<T>> Either<Error, T> invoke(T _target) | 45 public Either<Error, TreeNode> invoke(TreeNode _target) |
44 { | 46 { |
45 PutAttribute putAttribute = new PutAttribute(key,value); | 47 return _target.getAttributes().put(key,value); |
46 return putAttribute.edit(_target); | 48 } |
47 }*/ | |
48 | 49 |
49 @Override | 50 @Override |
50 public int getPosition() | 51 public int getPosition() |
51 { | 52 { |
52 return -1; | 53 return -1; |