查看本类的 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.buffer.ByteBufHolder;
20  import io.netty.channel.ChannelPipeline;
21  import io.netty.util.internal.UnstableApi;
22  
23  /**
24   * A chunk of bulk strings which is used for Redis chunked transfer-encoding.
25   * {@link RedisDecoder} generates {@link BulkStringRedisContent} after
26   * {@link BulkStringHeaderRedisMessage} when the content is large or the encoding of the content is chunked.
27   * If you prefer not to receive {@link BulkStringRedisContent} in your handler,
28   * place {@link RedisBulkStringAggregator} after {@link RedisDecoder} in the {@link ChannelPipeline}.
29   */
30  @UnstableApi
31  public interface BulkStringRedisContent extends RedisMessage, ByteBufHolder {
32  
33      @Override
34      BulkStringRedisContent copy();
35  
36      @Override
37      BulkStringRedisContent duplicate();
38  
39      @Override
40      BulkStringRedisContent retainedDuplicate();
41  
42      @Override
43      BulkStringRedisContent replace(ByteBuf content);
44  
45      @Override
46      BulkStringRedisContent retain();
47  
48      @Override
49      BulkStringRedisContent retain(int increment);
50  
51      @Override
52      BulkStringRedisContent touch();
53  
54      @Override
55      BulkStringRedisContent touch(Object hint);
56  }