EMMA Coverage Report (generated Tue Oct 27 11:32:50 PDT 2009)
[all classes][net.spy.memcached.protocol.binary]

COVERAGE SUMMARY FOR SOURCE FILE [DeleteOperationImpl.java]

nameclass, %method, %block, %line, %
DeleteOperationImpl.java100% (1/1)80%  (4/5)82%  (32/39)90%  (9/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DeleteOperationImpl100% (1/1)80%  (4/5)82%  (32/39)90%  (9/10)
getStatusForErrorCode (int, byte []): OperationStatus 0%   (0/1)0%   (0/7)0%   (0/1)
DeleteOperationImpl (String, OperationCallback): void 100% (1/1)100% (6/6)100% (2/2)
DeleteOperationImpl (String, long, OperationCallback): void 100% (1/1)100% (12/12)100% (4/4)
getKeys (): Collection 100% (1/1)100% (4/4)100% (1/1)
initialize (): void 100% (1/1)100% (10/10)100% (2/2)

1package net.spy.memcached.protocol.binary;
2 
3import java.util.Collection;
4import java.util.Collections;
5 
6import net.spy.memcached.ops.DeleteOperation;
7import net.spy.memcached.ops.OperationCallback;
8import net.spy.memcached.ops.OperationStatus;
9 
10class DeleteOperationImpl extends OperationImpl implements
11                DeleteOperation {
12 
13        private static final int CMD=4;
14 
15        private final String key;
16        private final long cas;
17 
18        public DeleteOperationImpl(String k, OperationCallback cb) {
19                this(k, 0, cb);
20        }
21 
22        public DeleteOperationImpl(String k, long c, OperationCallback cb) {
23                super(CMD, generateOpaque(), cb);
24                key=k;
25                cas=c;
26        }
27 
28        @Override
29        public void initialize() {
30                prepareBuffer(key, cas, EMPTY_BYTES);
31        }
32 
33        @Override
34        protected OperationStatus getStatusForErrorCode(int errCode, byte[] errPl) {
35                return errCode == ERR_NOT_FOUND ? NOT_FOUND_STATUS : null;
36        }
37 
38        public Collection<String> getKeys() {
39                return Collections.singleton(key);
40        }
41 
42}

[all classes][net.spy.memcached.protocol.binary]
EMMA 2.0.5312 (C) Vladimir Roubtsov