Package jnr.unixsocket
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 TypeMethodDescriptionvoid
close()
boolean
isOpen()
int
read
(ByteBuffer dst) int
write
(ByteBuffer src)
-
Field Details
-
channel
-
-
Constructor Details
-
UnselectableByteChannel
UnselectableByteChannel(UnixSocketChannel channel)
-
-
Method Details
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-