Mercurial > hg > Database > Alice
comparison src/alice/datasegment/LocalDataSegmentManager.java @ 190:a85ff8dc16c1 working
add Object data
author | one |
---|---|
date | Thu, 07 Mar 2013 21:27:00 +0900 |
parents | d2f5c885a367 |
children | f151dea22b2c |
comparison
equal
deleted
inserted
replaced
189:d2f5c885a367 | 190:a85ff8dc16c1 |
---|---|
66 addCommand(dataSegmentKey, cmd); | 66 addCommand(dataSegmentKey, cmd); |
67 if (logger.isDebugEnabled()) | 67 if (logger.isDebugEnabled()) |
68 logger.debug(cmd.getCommandString()); | 68 logger.debug(cmd.getCommandString()); |
69 } | 69 } |
70 | 70 |
71 public void put(String key, Object obj) { | |
72 DataSegmentKey dataSegmentKey = getDataSegmentKey(key); | |
73 Command cmd = new Command(CommandType.PUT, null, key, obj, 0, 0, replyQueue, null, reverseKey); | |
74 addCommand(dataSegmentKey, cmd); | |
75 if (logger.isDebugEnabled()) | |
76 logger.debug(cmd.getCommandString()); | |
77 } | |
78 | |
71 /** | 79 /** |
72 * Enqueue update command to the queue of each DataSegment key | 80 * Enqueue update command to the queue of each DataSegment key |
73 */ | 81 */ |
74 @Override | 82 @Override |
75 public void update(String key, Value val) { | 83 public void update(String key, Value val) { |
84 DataSegmentKey dataSegmentKey = getDataSegmentKey(key); | |
85 Command cmd = new Command(CommandType.UPDATE, null, key, val, 0, 0, replyQueue, null, reverseKey); | |
86 addCommand(dataSegmentKey, cmd); | |
87 if (logger.isDebugEnabled()) | |
88 logger.debug(cmd.getCommandString()); | |
89 } | |
90 | |
91 public void update(String key, Object val) { | |
76 DataSegmentKey dataSegmentKey = getDataSegmentKey(key); | 92 DataSegmentKey dataSegmentKey = getDataSegmentKey(key); |
77 Command cmd = new Command(CommandType.UPDATE, null, key, val, 0, 0, replyQueue, null, reverseKey); | 93 Command cmd = new Command(CommandType.UPDATE, null, key, val, 0, 0, replyQueue, null, reverseKey); |
78 addCommand(dataSegmentKey, cmd); | 94 addCommand(dataSegmentKey, cmd); |
79 if (logger.isDebugEnabled()) | 95 if (logger.isDebugEnabled()) |
80 logger.debug(cmd.getCommandString()); | 96 logger.debug(cmd.getCommandString()); |
126 addCommand(dataSegmentKey, cmd); | 142 addCommand(dataSegmentKey, cmd); |
127 if (logger.isDebugEnabled()) | 143 if (logger.isDebugEnabled()) |
128 logger.debug(cmd.getCommandString()); | 144 logger.debug(cmd.getCommandString()); |
129 } | 145 } |
130 | 146 |
147 public void flip(String key, Object val) { | |
148 DataSegmentKey dataSegmentKey = getDataSegmentKey(key); | |
149 Command cmd = new Command(CommandType.FLIP, null, key, val, 0, 0, replyQueue, null, reverseKey); | |
150 addCommand(dataSegmentKey, cmd); | |
151 if (logger.isDebugEnabled()) | |
152 logger.debug(cmd.getCommandString()); | |
153 } | |
154 | |
131 } | 155 } |