1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.handler.codec.memcache;
17
18 import io.netty.buffer.ByteBuf;
19 import io.netty.buffer.Unpooled;
20 import io.netty.handler.codec.DecoderResult;
21 import io.netty.util.internal.UnstableApi;
22
23
24
25
26
27
28
29
30 @UnstableApi
31 public interface LastMemcacheContent extends MemcacheContent {
32
33 LastMemcacheContent EMPTY_LAST_CONTENT = new LastMemcacheContent() {
34
35 @Override
36 public LastMemcacheContent copy() {
37 return EMPTY_LAST_CONTENT;
38 }
39
40 @Override
41 public LastMemcacheContent duplicate() {
42 return this;
43 }
44
45 @Override
46 public LastMemcacheContent retainedDuplicate() {
47 return this;
48 }
49
50 @Override
51 public LastMemcacheContent replace(ByteBuf content) {
52 return new DefaultLastMemcacheContent(content);
53 }
54
55 @Override
56 public LastMemcacheContent retain(int increment) {
57 return this;
58 }
59
60 @Override
61 public LastMemcacheContent retain() {
62 return this;
63 }
64
65 @Override
66 public LastMemcacheContent touch() {
67 return this;
68 }
69
70 @Override
71 public LastMemcacheContent touch(Object hint) {
72 return this;
73 }
74
75 @Override
76 public ByteBuf content() {
77 return Unpooled.EMPTY_BUFFER;
78 }
79
80 @Override
81 public DecoderResult decoderResult() {
82 return DecoderResult.SUCCESS;
83 }
84
85 @Override
86 public void setDecoderResult(DecoderResult result) {
87 throw new UnsupportedOperationException("read only");
88 }
89
90 @Override
91 public int refCnt() {
92 return 1;
93 }
94
95 @Override
96 public boolean release() {
97 return false;
98 }
99
100 @Override
101 public boolean release(int decrement) {
102 return false;
103 }
104 };
105
106 @Override
107 LastMemcacheContent copy();
108
109 @Override
110 LastMemcacheContent duplicate();
111
112 @Override
113 LastMemcacheContent retainedDuplicate();
114
115 @Override
116 LastMemcacheContent replace(ByteBuf content);
117
118 @Override
119 LastMemcacheContent retain(int increment);
120
121 @Override
122 LastMemcacheContent retain();
123
124 @Override
125 LastMemcacheContent touch();
126
127 @Override
128 LastMemcacheContent touch(Object hint);
129 }