查看本类的 API文档回源码主页即时通讯网 - 即时通讯开发者社区!
1   /*
2    * Copyright 2016 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License, version 2.0 (the
5    * "License"); you may not use this file except in compliance with the License. You may obtain a
6    * copy of the License at:
7    *
8    * https://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software distributed under the License
11   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing permissions and limitations under
13   * the License.
14   */
15  
16  package io.netty.handler.codec.redis;
17  
18  import io.netty.buffer.ByteBuf;
19  import io.netty.util.internal.UnstableApi;
20  
21  /**
22   * A default implementation for {@link LastBulkStringRedisContent}.
23   */
24  @UnstableApi
25  public final class DefaultLastBulkStringRedisContent extends DefaultBulkStringRedisContent
26          implements LastBulkStringRedisContent {
27  
28      /**
29       * Creates a {@link DefaultLastBulkStringRedisContent} for the given {@code content}.
30       * @param content the content, can be {@code null}.
31       */
32      public DefaultLastBulkStringRedisContent(ByteBuf content) {
33          super(content);
34      }
35  
36      @Override
37      public LastBulkStringRedisContent copy() {
38          return (LastBulkStringRedisContent) super.copy();
39      }
40  
41      @Override
42      public LastBulkStringRedisContent duplicate() {
43          return (LastBulkStringRedisContent) super.duplicate();
44      }
45  
46      @Override
47      public LastBulkStringRedisContent retainedDuplicate() {
48          return (LastBulkStringRedisContent) super.retainedDuplicate();
49      }
50  
51      @Override
52      public LastBulkStringRedisContent replace(ByteBuf content) {
53          return new DefaultLastBulkStringRedisContent(content);
54      }
55  
56      @Override
57      public LastBulkStringRedisContent retain() {
58          super.retain();
59          return this;
60      }
61  
62      @Override
63      public LastBulkStringRedisContent retain(int increment) {
64          super.retain(increment);
65          return this;
66      }
67  
68      @Override
69      public LastBulkStringRedisContent touch() {
70          super.touch();
71          return this;
72      }
73  
74      @Override
75      public LastBulkStringRedisContent touch(Object hint) {
76          super.touch(hint);
77          return this;
78      }
79  }