Fix checkstyle errors
Motivation: -to fix checkstyle error and missing licence Modification: -Added missing license and fixed checkstyle error Result: it's a non functional change
This commit is contained in:
parent
63c490470c
commit
6ab424f3c6
@ -212,7 +212,6 @@ abstract class AbstractIOUringChannel extends AbstractChannel implements UnixCha
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void handleReadException(ChannelPipeline pipeline, ByteBuf byteBuf,
|
||||
Throwable cause, boolean close,
|
||||
IOUringRecvByteAllocatorHandle allocHandle) {
|
||||
|
@ -15,7 +15,12 @@
|
||||
*/
|
||||
package io.netty.channel.uring;
|
||||
|
||||
import io.netty.channel.*;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelOutboundBuffer;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.channel.ChannelPromise;
|
||||
import io.netty.channel.ServerChannel;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
|
||||
@ -75,7 +80,6 @@ abstract class AbstractIOUringServerChannel extends AbstractIOUringChannel imple
|
||||
promise.setFailure(new UnsupportedOperationException());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void uringEventExecution() {
|
||||
final IOUringEventLoop ioUringEventLoop = (IOUringEventLoop) eventLoop();
|
||||
|
@ -219,7 +219,8 @@ final class IOUringEventLoop extends SingleThreadEventLoop implements
|
||||
case IOUring.IO_POLL:
|
||||
if (eventfd.intValue() == fd) {
|
||||
pendingWakeup = false;
|
||||
// We need to consume the data as otherwise we would see another event in the completionQueue without
|
||||
// We need to consume the data as otherwise we would see another event
|
||||
// in the completionQueue without
|
||||
// an extra eventfd_write(....)
|
||||
Native.eventFdRead(eventfd.intValue());
|
||||
submissionQueue.addPollLink(eventfd.intValue());
|
||||
|
@ -118,7 +118,7 @@ final class IOUringSubmissionQueue {
|
||||
|
||||
// Store the fd and event type in the user_data field
|
||||
int opMask = (((short) op) << 16) | (((short) pollMask) & 0xFFFF);
|
||||
long uData = (long)fd << 32 | opMask & 0xFFFFFFFFL;
|
||||
long uData = (long) fd << 32 | opMask & 0xFFFFFFFFL;
|
||||
|
||||
PlatformDependent.putLong(sqe + SQE_USER_DATA_FIELD, uData);
|
||||
|
||||
@ -168,12 +168,10 @@ final class IOUringSubmissionQueue {
|
||||
return addPoll(fd, IOUring.POLLMASK_LINK);
|
||||
}
|
||||
|
||||
|
||||
public boolean addPollOut(int fd) {
|
||||
return addPoll(fd, IOUring.POLLMASK_OUT);
|
||||
}
|
||||
|
||||
|
||||
public boolean addPollRdHup(int fd) {
|
||||
return addPoll(fd, IOUring.POLLMASK_RDHUP);
|
||||
}
|
||||
@ -211,7 +209,7 @@ final class IOUringSubmissionQueue {
|
||||
if (sqe == 0) {
|
||||
return false;
|
||||
}
|
||||
setData(sqe, (byte) IOUring.OP_ACCEPT, 0, fd, 0,0,0);
|
||||
setData(sqe, (byte) IOUring.OP_ACCEPT, 0, fd, 0, 0, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -28,26 +28,22 @@ public class IOUringEventLoopTest {
|
||||
loop.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
}).sync();
|
||||
|
||||
loop.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
}).sync();
|
||||
loop.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
}).sync();
|
||||
loop.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
}).sync();
|
||||
} finally {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2020 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:
|
||||
*
|
||||
* http://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.uring;
|
||||
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
|
Loading…
Reference in New Issue
Block a user