Class IoUringDomainSocketChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.uring.AbstractIoUringChannel
io.netty.channel.uring.AbstractIoUringStreamChannel
io.netty.channel.uring.IoUringDomainSocketChannel
- All Implemented Interfaces:
Channel, ChannelOutboundInvoker, DuplexChannel, DomainSocketChannel, UnixChannel, AttributeMap, Comparable<Channel>
public final class IoUringDomainSocketChannel
extends AbstractIoUringStreamChannel
implements DomainSocketChannel
DomainSocketChannel implementation that uses linux io_uring-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classNested classes/interfaces inherited from class AbstractIoUringStreamChannel
AbstractIoUringStreamChannel.IoUringStreamUnsafeNested classes/interfaces inherited from class AbstractIoUringChannel
AbstractIoUringChannel.AbstractUringUnsafeNested classes/interfaces inherited from class AbstractChannel
AbstractChannel.AbstractUnsafeNested classes/interfaces inherited from interface Channel
Channel.Unsafe -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IoUringDomainSocketChannelConfigprivate DomainSocketAddressprivate DomainSocketAddressFields inherited from class AbstractIoUringStreamChannel
readId, readOpCode, writeId, writeOpCodeFields inherited from class AbstractIoUringChannel
active, socket, writeTracker -
Constructor Summary
ConstructorsConstructorDescriptionIoUringDomainSocketChannel(Channel parent, FileDescriptor fd) IoUringDomainSocketChannel(Channel parent, LinuxSocket fd) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanconfig()Returns the configuration of this channel.protected ObjectInvoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another.(package private) booleanReturns the local address where this channel is bound to.Create a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannelReturns the unix credentials (uid, gid, pid) of the peer SO_PEERCREDReturns the remote address where this channel is connected to.protected booleanshouldCompleteReadLoop(int flags, boolean multishot) protected booleansocketIsEmpty(int flags) Return if the socket is guaranteed to be empty when the submitted io was executed and the completion event be created.Methods inherited from class AbstractIoUringStreamChannel
cancelOutstandingReads, cancelOutstandingWrites, doRegister, doShutdownOutput0, isInputShutdown, isOutputShutdown, isShutdown, isStreamSocket, metadata, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutputMethods inherited from class AbstractIoUringChannel
autoReadCleared, checkResolvable, doBeginRead, doBind, doClose, doDeregister, doDisconnect, doShutdownOutput, doWrite, fd, isActive, isCompatible, isOpen, localAddress0, newDirectBuffer, newDirectBuffer, nextOpsId, registration, remoteAddress0, resetCachedAddresses, schedulePollRdHup, scheduleWriteIfNeeded, submitAndRunNowMethods inherited from class AbstractChannel
closeFuture, compareTo, doRegister, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, toString, unsafe, validateFileRegion, voidPromiseMethods inherited from class DefaultAttributeMap
attr, hasAttrMethods inherited from interface AttributeMap
attr, hasAttrMethods inherited from interface Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isActive, isOpen, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushMethods inherited from interface Comparable
compareToMethods inherited from interface DuplexChannel
isInputShutdown, isOutputShutdown, isShutdown, shutdown, shutdown, shutdownInput, shutdownInput, shutdownOutput, shutdownOutputMethods inherited from interface UnixChannel
fd
-
Field Details
-
config
-
local
-
remote
-
-
Constructor Details
-
IoUringDomainSocketChannel
public IoUringDomainSocketChannel() -
IoUringDomainSocketChannel
IoUringDomainSocketChannel(Channel parent, FileDescriptor fd) -
IoUringDomainSocketChannel
IoUringDomainSocketChannel(Channel parent, LinuxSocket fd)
-
-
Method Details
-
config
Description copied from interface:ChannelReturns the configuration of this channel.- Specified by:
configin interfaceChannel- Specified by:
configin interfaceDomainSocketChannel
-
localAddress
Description copied from interface:ChannelReturns the local address where this channel is bound to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
localAddressin interfaceChannel- Specified by:
localAddressin interfaceDomainSocketChannel- Overrides:
localAddressin classAbstractChannel- Returns:
- the local address of this channel.
nullif this channel is not bound.
-
remoteAddress
Description copied from interface:ChannelReturns the remote address where this channel is connected to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
remoteAddressin interfaceChannel- Specified by:
remoteAddressin interfaceDomainSocketChannel- Overrides:
remoteAddressin classAbstractChannel- Returns:
- the remote address of this channel.
nullif this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g.DatagramChannel, useDefaultAddressedEnvelope.recipient()to determine the origination of the received message as this method will returnnull.
-
peerCredentials
Returns the unix credentials (uid, gid, pid) of the peer SO_PEERCRED- Throws:
IOException
-
filterOutboundMessage
Description copied from class:AbstractChannelInvoked when a new message is added to aChannelOutboundBufferof thisAbstractChannel, so that theChannelimplementation converts the message to another. (e.g. heap buffer -> direct buffer)- Overrides:
filterOutboundMessagein classAbstractIoUringStreamChannel
-
newUnsafe
Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Overrides:
newUnsafein classAbstractIoUringStreamChannel
-
allowMultiShotPollIn
protected boolean allowMultiShotPollIn()- Overrides:
allowMultiShotPollInin classAbstractIoUringChannel
-
socketIsEmpty
protected boolean socketIsEmpty(int flags) Description copied from class:AbstractIoUringChannelReturn if the socket is guaranteed to be empty when the submitted io was executed and the completion event be created.- Overrides:
socketIsEmptyin classAbstractIoUringStreamChannel- Parameters:
flags- the flags that were part of the completion- Returns:
trueif empty.
-
shouldCompleteReadLoop
protected boolean shouldCompleteReadLoop(int flags, boolean multishot) - Overrides:
shouldCompleteReadLoopin classAbstractIoUringStreamChannel
-
isPollInFirst
boolean isPollInFirst()- Overrides:
isPollInFirstin classAbstractIoUringStreamChannel
-