| 1 | package net.spy.memcached.protocol.ascii; |
| 2 | |
| 3 | import net.spy.memcached.ops.ConcatenationOperation; |
| 4 | import net.spy.memcached.ops.ConcatenationType; |
| 5 | import net.spy.memcached.ops.OperationCallback; |
| 6 | |
| 7 | /** |
| 8 | * Operation for ascii concatenations. |
| 9 | */ |
| 10 | public class ConcatenationOperationImpl extends BaseStoreOperationImpl |
| 11 | implements ConcatenationOperation { |
| 12 | |
| 13 | private final ConcatenationType concatType; |
| 14 | |
| 15 | public ConcatenationOperationImpl(ConcatenationType t, String k, |
| 16 | byte[] d, OperationCallback cb) { |
| 17 | super(t.name(), k, 0, 0, d, cb); |
| 18 | concatType = t; |
| 19 | } |
| 20 | |
| 21 | public long getCasValue() { |
| 22 | // ASCII cat ops don't have CAS. |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | public ConcatenationType getStoreType() { |
| 27 | return concatType; |
| 28 | } |
| 29 | |
| 30 | } |