-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce IoEvent to prepare support for io_uring (#14024)
Motiviation: To support things like io_uring we need to support different things like IoOps as a result for notifications. Like for example you would issue a connect via the IoRegistration when using io_uring but receive some specific event on the completion queue once it was done. Modification: - Add new IoEvent interface - Change IoHandle.handle(...) signature to use IoEvent as a param - Rewrite existing implementations to use new signature. Result: More flexible API which can support also things like io_uring
- Loading branch information
1 parent
c390810
commit 7ed972d
Showing
37 changed files
with
535 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollIoEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2024 The Netty Project | ||
* | ||
* The Netty Project licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package io.netty.channel.epoll; | ||
|
||
import io.netty.channel.IoEvent; | ||
|
||
/** | ||
* {@link IoEvent} that must be handled by the {@link EpollIoHandle}. | ||
*/ | ||
public interface EpollIoEvent extends IoEvent { | ||
|
||
/** | ||
* Returns the {@link EpollIoOps} which did trigger the {@link EpollIoEvent}. | ||
* | ||
* @return ops. | ||
*/ | ||
EpollIoOps ops(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.