Commit 4b4fbc1
authored
Refactor AliasOrIndex abstraction. (elastic#54394)
Backport of elastic#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 elastic#531001 parent 00eaa0e commit 4b4fbc1
File tree
41 files changed
+345
-290
lines changed- plugins/examples/security-authorization-engine/src
- main/java/org/elasticsearch/example
- test/java/org/elasticsearch/example
- server/src
- main/java/org/elasticsearch
- action
- admin/indices/rollover
- bulk
- cluster/metadata
- test/java/org/elasticsearch
- action/admin/indices/rollover
- aliases
- cluster/metadata
- x-pack/plugin
- core/src
- main/java/org/elasticsearch/xpack/core
- ilm
- ml
- annotations
- job/persistence
- utils
- security/authz
- permission
- slm/history
- test/java/org/elasticsearch/xpack/core/security/authz
- permission
- store
- enrich/src/main/java/org/elasticsearch/xpack/enrich
- identity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/sp
- ilm/src/main/java/org/elasticsearch/xpack/ilm/history
- ml/src/test/java/org/elasticsearch/xpack/ml/integration
- security/src
- main/java/org/elasticsearch/xpack/security
- authz
- store
- support
- test/java/org/elasticsearch
- test
- xpack/security
- authz
- accesscontrol
- store
- support
- transform/src/main/java/org/elasticsearch/xpack/transform
- watcher/src
- main/java/org/elasticsearch/xpack/watcher/watch
- test/java/org/elasticsearch/xpack/watcher
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+345
-290
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
| 179 | + | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
185 | 186 | | |
186 | | - | |
187 | | - | |
188 | | - | |
| 187 | + | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
| |||
Lines changed: 72 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | | - | |
| 49 | + | |
44 | 50 | | |
45 | | - | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
49 | | - | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
58 | 104 | | |
59 | 105 | | |
60 | 106 | | |
61 | | - | |
| 107 | + | |
62 | 108 | | |
63 | 109 | | |
64 | 110 | | |
| |||
67 | 113 | | |
68 | 114 | | |
69 | 115 | | |
70 | | - | |
71 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
72 | 123 | | |
73 | 124 | | |
74 | 125 | | |
75 | 126 | | |
76 | 127 | | |
77 | 128 | | |
78 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
79 | 135 | | |
80 | 136 | | |
81 | 137 | | |
| |||
85 | 141 | | |
86 | 142 | | |
87 | 143 | | |
88 | | - | |
| 144 | + | |
89 | 145 | | |
90 | 146 | | |
91 | 147 | | |
| |||
100 | 156 | | |
101 | 157 | | |
102 | 158 | | |
103 | | - | |
104 | | - | |
| 159 | + | |
| 160 | + | |
105 | 161 | | |
106 | 162 | | |
107 | | - | |
| 163 | + | |
108 | 164 | | |
109 | 165 | | |
110 | 166 | | |
| |||
131 | 187 | | |
132 | 188 | | |
133 | 189 | | |
134 | | - | |
| 190 | + | |
135 | 191 | | |
136 | 192 | | |
137 | 193 | | |
| |||
0 commit comments