spike refactor of logstashbridge stable API #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a spike that does a few things on top of your adoption spike in response to the LS-filter PR. I can go back and make smaller commits if it helps.
Internal & External vs Unwrap & Wrap
It is easy to get lost as to what wrap and unwrap mean, especially since we are actually implementing some of these bridge interfaces over in the LS-filer.
Uses "internal" and "external" terminology throughout.
StableBridgeAPI<T>becomesStableBridgeAPI<INTERNAL>to make it clear that the type we mirroring is the elasticsearch-internal typewraptofromInternalunwraptotoInternalStableBridgeAPI.Proxy<T>class—which implementsStableBridgeAPI<T>becomesStableBridgeAPI.ProxyInternal<INTERNAL>to make it clearer that we are proxying an elasticsearch-internal objectTo accommodate this change in your your stable bridge adoption spike:
/s/unwrap/toInternal/g/s/wrap/fromInternal/gAbstract Base Class of ProcessorBridge for external implementations
Adds an abstract base class for external implementations called
ProcessorBridge.AbstractExternaltoInternalby providing anProxyExternalthat satisfies the elasticsearch-internalProcessorby proxying through to the external implementation of thePipelineBridgeProcessorBridge.fromInternal(Processor)intercepts these external-proxies and returns their wrapped external bridge implementation directly instead of double-wrapping themTo accommodate this:
PipelineProcessorwill need to extendProcessorBridge.AbstractExternalinstead of implementingProcessorBridge.Better commentary for classes and interfaces.
Resolved a lot of code-style warnings by describing the function of classes