Class UnixSocket.UnselectableByteChannel
java.lang.Object
jnr.unixsocket.UnixSocket.UnselectableByteChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, ReadableByteChannel, WritableByteChannel
- Enclosing class:
UnixSocket
static final class UnixSocket.UnselectableByteChannel
extends Object
implements ReadableByteChannel, WritableByteChannel
A byte channel that doesn't implement
SelectableChannel. Though
that type isn't in the public API, if the channel passed in implements
that interface then unwanted synchronization is performed which can harm
concurrency and can cause deadlocks.
https://bugs.openjdk.java.net/browse/JDK-4774871-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanisOpen()intread(ByteBuffer dst) intwrite(ByteBuffer src)
-
Field Details
-
channel
-
-
Constructor Details
-
UnselectableByteChannel
UnselectableByteChannel(UnixSocketChannel channel)
-
-
Method Details
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
isOpen
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-