OpenSearch/x-pack/plugin/watcher
Martijn van Groningen 4b4fbc160d
Refactor AliasOrIndex abstraction. (#54394)
Backport of #53982

In order to prepare the `AliasOrIndex` abstraction for the introduction of data streams,
the abstraction needs to be made more flexible, because currently it really can be only
an alias or an index.

* Renamed `AliasOrIndex` to `IndexAbstraction`.
* Introduced a `IndexAbstraction.Type` enum to indicate what a `IndexAbstraction` instance is.
* Replaced the `isAlias()` method that returns a boolean with the `getType()` method that returns the new Type enum.
* Moved `getWriteIndex()` up from the `IndexAbstraction.Alias` to the `IndexAbstraction` interface.
* Moved `getAliasName()` up from the `IndexAbstraction.Alias` to the `IndexAbstraction` interface and renamed it to `getName()`.
* Removed unnecessary casting to `IndexAbstraction.Alias` by just checking the `getType()` method.

Relates to #53100
2020-03-30 10:12:16 +02:00
..
licenses Upgrade to the latest OWASP HTML sanitizer (#50765) (#51166) 2020-01-17 10:00:33 -07:00
qa [7.x] Add Watcher to available rest resources (#53620) (#53764) 2020-03-19 12:29:36 -05:00
src Refactor AliasOrIndex abstraction. (#54394) 2020-03-30 10:12:16 +02:00
build.gradle Refactor global build info plugin to leverage JavaInstallationRegistry (#54026) 2020-03-23 15:30:10 -07:00