View Javadoc
1   /*
2    * Copyright 2025 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a 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
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  package io.netty.channel.uring;
17  
18  import io.netty.buffer.ByteBufAllocator;
19  import io.netty.channel.DefaultChannelConfig;
20  import io.netty.channel.MessageSizeEstimator;
21  import io.netty.channel.RecvByteBufAllocator;
22  import io.netty.channel.WriteBufferWaterMark;
23  
24  abstract class IoUringChannelConfig extends DefaultChannelConfig {
25      IoUringChannelConfig(AbstractIoUringChannel channel) {
26          super(channel);
27      }
28  
29      IoUringChannelConfig(AbstractIoUringChannel channel, RecvByteBufAllocator allocator) {
30          super(channel, allocator);
31      }
32  
33      @Override
34      public IoUringChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead) {
35          super.setMaxMessagesPerRead(maxMessagesPerRead);
36          return this;
37      }
38  
39      @Override
40      public IoUringChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis) {
41          super.setConnectTimeoutMillis(connectTimeoutMillis);
42          return this;
43      }
44  
45      @Override
46      public IoUringChannelConfig setMaxMessagesPerWrite(int maxMessagesPerWrite) {
47          super.setMaxMessagesPerWrite(maxMessagesPerWrite);
48          return this;
49      }
50  
51      @Override
52      public IoUringChannelConfig setWriteSpinCount(int writeSpinCount) {
53          super.setWriteSpinCount(writeSpinCount);
54          return this;
55      }
56  
57      @Override
58      public IoUringChannelConfig setAllocator(ByteBufAllocator allocator) {
59          super.setAllocator(allocator);
60          return this;
61      }
62  
63      @Override
64      public IoUringChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator) {
65          super.setRecvByteBufAllocator(allocator);
66          return this;
67      }
68  
69      @Override
70      public IoUringChannelConfig setAutoRead(boolean autoRead) {
71          super.setAutoRead(autoRead);
72          return this;
73      }
74  
75      @Override
76      public IoUringChannelConfig setAutoClose(boolean autoClose) {
77          super.setAutoClose(autoClose);
78          return this;
79      }
80  
81      @Override
82      public IoUringChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) {
83          super.setWriteBufferLowWaterMark(writeBufferLowWaterMark);
84          return this;
85      }
86  
87      @Override
88      public IoUringChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator) {
89          super.setMessageSizeEstimator(estimator);
90          return this;
91      }
92  
93      @Override
94      public IoUringChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark) {
95          super.setWriteBufferWaterMark(writeBufferWaterMark);
96          return this;
97      }
98  
99      @Override
100     public IoUringChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) {
101         super.setWriteBufferHighWaterMark(writeBufferHighWaterMark);
102         return this;
103     }
104 
105     @Override
106     protected void autoReadCleared() {
107         ((AbstractIoUringChannel) channel).autoReadCleared();
108     }
109 }