1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.handler.codec.redis;
17
18 import io.netty.buffer.ByteBuf;
19 import io.netty.buffer.DefaultByteBufHolder;
20 import io.netty.util.internal.StringUtil;
21 import io.netty.util.internal.UnstableApi;
22
23
24
25
26 @UnstableApi
27 public class DefaultBulkStringRedisContent extends DefaultByteBufHolder implements BulkStringRedisContent {
28
29
30
31
32
33
34 public DefaultBulkStringRedisContent(ByteBuf content) {
35 super(content);
36 }
37
38 @Override
39 public BulkStringRedisContent copy() {
40 return (BulkStringRedisContent) super.copy();
41 }
42
43 @Override
44 public BulkStringRedisContent duplicate() {
45 return (BulkStringRedisContent) super.duplicate();
46 }
47
48 @Override
49 public BulkStringRedisContent retainedDuplicate() {
50 return (BulkStringRedisContent) super.retainedDuplicate();
51 }
52
53 @Override
54 public BulkStringRedisContent replace(ByteBuf content) {
55 return new DefaultBulkStringRedisContent(content);
56 }
57
58 @Override
59 public BulkStringRedisContent retain() {
60 super.retain();
61 return this;
62 }
63
64 @Override
65 public BulkStringRedisContent retain(int increment) {
66 super.retain(increment);
67 return this;
68 }
69
70 @Override
71 public BulkStringRedisContent touch() {
72 super.touch();
73 return this;
74 }
75
76 @Override
77 public BulkStringRedisContent touch(Object hint) {
78 super.touch(hint);
79 return this;
80 }
81
82 @Override
83 public String toString() {
84 return new StringBuilder(StringUtil.simpleClassName(this))
85 .append('[')
86 .append("content=")
87 .append(content())
88 .append(']').toString();
89 }
90 }