Class TestLessInputStream.TestLessInputStreamBuilder
java.lang.Object
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream.TestLessInputStreamBuilder
- Enclosing class:
- TestLessInputStream
Builds
streams
, registers cachable commands
and provides accessible API to dispatch immediate commands to all atomically
alive streams.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
Event is persisted.private final class
private final class
Event is called just now for all alive streams and command is not persisted.private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Queue<TestLessInputStream>
private final TestLessInputStream.TestLessInputStreamBuilder.Node
private final ReentrantReadWriteLock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
addTailNodeIfAbsent
(Command command) build()
Cached commands are sent to all alive or future alive forks.OnlyNotifiableTestStream.noop()
andNotifiableTestStream.shutdown(Shutdown)
are supported.The iterator is not thread safe.private static TestLessInputStream.TestLessInputStreamBuilder.Node
void
-
Field Details
-
rwLock
-
aliveStreams
-
immediateCommands
-
cachableCommands
-
head
-
iterableCachable
-
-
Constructor Details
-
TestLessInputStreamBuilder
public TestLessInputStreamBuilder()
-
-
Method Details
-
build
-
removeStream
-
getImmediateCommands
OnlyNotifiableTestStream.noop()
andNotifiableTestStream.shutdown(Shutdown)
are supported. Another methods throwUnsupportedOperationException
.- Returns:
- commands which are immediately transmitted once to all alive forked JVMs, not cached. As opposite to cached commands, the immediate commands disappear and cannot be seen by any fork initiated after the command has dispatched.
-
getCachableCommands
Cached commands are sent to all alive or future alive forks. These are termination commands which are not reversible and therefore onlyNotifiableTestStream.shutdown(Shutdown)
andNotifiableTestStream.skipSinceNextTest()
are supported. Another methods throwUnsupportedOperationException
.- Returns:
- commands which are cached for currently alive or future forks.
-
getIterableCachable
The iterator is not thread safe. -
addTailNodeIfAbsent
-
nextCachedNode
private static TestLessInputStream.TestLessInputStreamBuilder.Node nextCachedNode(TestLessInputStream.TestLessInputStreamBuilder.Node current)
-