Class Channels
java.lang.Object
org.apache.maven.surefire.api.util.internal.Channels
Converts
We do not use the Java's utility class
OutputStream, PrintStream, InputStream to the Java Channel.
We do not use the Java's utility class
Channels because the utility closes the stream as
soon as the particular Thread is interrupted. If the frameworks (Zookeeper, Netty) interrupts the thread, the
communication channels become closed and the JVM hangs. Therefore we developed internal utility which is safe for the
Surefire.- Since:
- 3.0.0-M5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadableByteChannelstatic WritableBufferedByteChannelstatic ReadableByteChannelprivate static ReadableByteChannelnewChannel(InputStream is, int bufferSize) static WritableByteChannelnewChannel(OutputStream out) private static WritableBufferedByteChannelnewChannel(OutputStream out, int bufferSize) static InputStreamnewInputStream(AsynchronousByteChannel channel) static OutputStreamnewOutputStream(AsynchronousByteChannel channel)
-
Field Details
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
-
Constructor Details
-
Channels
private Channels()
-
-
Method Details
-
newChannel
-
newBufferedChannel
-
newChannel
-
newBufferedChannel
-
newOutputStream
-
newInputStream
-
newChannel
-
newChannel
private static WritableBufferedByteChannel newChannel(@Nonnull OutputStream out, @Nonnegative int bufferSize)
-