E - element type to extractpublic static interface DocumentExtractor.Builder<E> extends net.openhft.chronicle.core.util.Builder<DocumentExtractor<E>>
| Modifier and Type | Method and Description |
|---|---|
<I> @NotNull DocumentExtractor.Builder<E> |
withMethod(@NotNull Class<I> interfaceType,
@NotNull BiConsumer<? super I,? super E> methodReference)
Specifies an
interfaceType that was previously used to write messages of type E using
a method writer via invocations of the provided methodReference. |
@NotNull DocumentExtractor.Builder<E> |
withReusing(@NotNull Supplier<? extends E> supplier)
Specifies a
supplier of element that shall be reused when extracting elements from excerpts. |
@NotNull DocumentExtractor.Builder<E> |
withThreadConfinedReuse()
Specifies that only one reuse object, confined to the first using thread, shall be reused.
|
@NotNull @NotNull DocumentExtractor.Builder<E> withReusing(@NotNull @NotNull Supplier<? extends E> supplier)
supplier of element that shall be reused when extracting elements from excerpts.
By default, thread local reuse objects are created on demand but this can be changed by means of the
withThreadConfinedReuse() method.
The provided supplier must provide distinct objects on each invocation. This can be accomplished
, for example, by referencing Foo:new.
supplier - to call when reuse object are needed (non-null)@NotNull @NotNull DocumentExtractor.Builder<E> withThreadConfinedReuse()
The DocumentExtractor is guaranteed to prevent accidental concurrent thread access by throwing
an IllegalStateException if accessed by a foreign thread.
@NotNull <I> @NotNull DocumentExtractor.Builder<E> withMethod(@NotNull @NotNull Class<I> interfaceType, @NotNull @NotNull BiConsumer<? super I,? super E> methodReference)
interfaceType that was previously used to write messages of type E using
a method writer via invocations of the provided methodReference.
The provided methodReference must be a true method reference (e.g. Greeting:message)
or a corresponding lambda expression
(e.g. (Greeting greeting, String msg) -> greeting.message(m)) ) or else the
result is undefined.
I - interface typeinterfaceType - interface that has at least one method that takes a single
argument parameter of type EmethodReference - connecting the interface type to a method that takes a single
argument parameter of type ECopyright © 2023. All rights reserved.