forked from michaelmosmann/embedmongo.flapdoodle.de
/
Version.java
267 lines (236 loc) · 5.86 KB
/
Version.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
/**
* Copyright (C) 2011
* Michael Mosmann <michael@mosmann.de>
* Martin Jöhren <m.joehren@googlemail.com>
*
* with contributions from
* konstantin-ba@github,Archimedes Trajano (trajano@github)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.flapdoodle.embed.mongo.distribution;
import java.util.EnumSet;
/**
* MongoDB Version enum
*/
public enum Version implements IFeatureAwareVersion {
@Deprecated
V1_6_5("1.6.5"),
@Deprecated
V1_7_6("1.7.6"),
@Deprecated
V1_8_0_rc0("1.8.0-rc0"),
@Deprecated
V1_8_0("1.8.0"),
@Deprecated
V1_8_1("1.8.1"),
@Deprecated
V1_8_2_rc0("1.8.2-rc0"),
@Deprecated
V1_8_2("1.8.2"),
@Deprecated
V1_8_4("1.8.4"),
@Deprecated
V1_8_5("1.8.5"),
@Deprecated
V1_9_0("1.9.0"),
@Deprecated
V2_0_1("2.0.1"),
@Deprecated
V2_0_4("2.0.4"),
@Deprecated
V2_0_5("2.0.5"),
@Deprecated
V2_0_6("2.0.6"),
@Deprecated
V2_0_7_RC1("2.0.7-rc1"),
@Deprecated
V2_0_7("2.0.7"),
@Deprecated
V2_0_8_RC0("2.0.8-rc0"),
@Deprecated
V2_0_9("2.0.9"),
@Deprecated
V2_1_0("2.1.0"),
@Deprecated
V2_1_1("2.1.1"),
@Deprecated
V2_1_2("2.1.2"),
@Deprecated
V2_2_0_RC0("2.2.0-rc0"),
@Deprecated
V2_2_0("2.2.0"),
@Deprecated
V2_2_1("2.2.1"),
@Deprecated
V2_2_3("2.2.3"),
@Deprecated
V2_2_4("2.2.4"),
@Deprecated
V2_2_5("2.2.5"),
@Deprecated
V2_2_6("2.2.6"),
V2_2_7("2.2.7"),
@Deprecated
V2_3_0("2.3.0"),
@Deprecated
V2_4_0_RC3("2.4.0-rc3"),
@Deprecated
V2_4_0("2.4.0",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_1("2.4.1",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_2("2.4.2",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_3("2.4.3",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_5("2.4.5",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_6("2.4.6",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_7("2.4.7",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_8("2.4.8",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_4_9("2.4.9",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
V2_4_10("2.4.10",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_5_0("2.5.0",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_5_1("2.5.1",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_5_3("2.5.3",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
@Deprecated
V2_5_4("2.5.4",Feature.SYNC_DELAY, Feature.TEXT_SEARCH),
/**
* 2.6 series production releases --------------
*/
@Deprecated
V2_6_0("2.6.0",Feature.SYNC_DELAY),
@Deprecated
V2_6_1("2.6.1",Feature.SYNC_DELAY),
@Deprecated
V2_6_8("2.6.8",Feature.SYNC_DELAY),
@Deprecated
V2_6_10("2.6.10",Feature.SYNC_DELAY),
/**
* Latest 2.6 production release
*/
V2_6_11("2.6.11",Feature.SYNC_DELAY),
/**
* Latest 2.7 series development release
*/
@Deprecated
V2_7_0("2.7.0",Feature.SYNC_DELAY),
@Deprecated
V2_7_1("2.7.1",Feature.SYNC_DELAY),
/**
* Latest 3.0 series production release
*/
@Deprecated
V3_0_0("3.0.0", Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_1("3.0.1",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_2("3.0.2",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_4("3.0.4",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_5("3.0.5",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_6("3.0.6",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_7("3.0.7",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_0_8("3.0.8",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
/**
* Latest 3.1 series development release
*/
@Deprecated
V3_1_0("3.1.0",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_1_5("3.1.5",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
@Deprecated
V3_1_6("3.1.6",Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
/**
* Latest 3.2 series production release
*/
V3_2_0("3.2.0", Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
/**
* Latest 3.2 series development release
*/
V3_2_1_RC3("3.2.1-rc3", Feature.SYNC_DELAY, Feature.STORAGE_ENGINE),
;
private final String specificVersion;
private EnumSet<Feature> features;
Version(String vName,Feature...features) {
this.specificVersion = vName;
this.features = Feature.asSet(features);
}
@Override
public String asInDownloadPath() {
return specificVersion;
}
@Override
public boolean enabled(Feature feature) {
return features.contains(feature);
}
@Override
public String toString() {
return "Version{" + specificVersion + '}';
}
public static enum Main implements IFeatureAwareVersion {
@Deprecated
V1_8(V1_8_5),
@Deprecated
V2_0(V2_0_9),
@Deprecated
V2_1(V2_1_2),
V2_2(V2_2_7),
@Deprecated
V2_3(V2_3_0),
V2_4(V2_4_10),
@Deprecated
V2_5(V2_5_4),
@Deprecated
V2_6(V2_6_11),
@Deprecated
V2_7(V2_7_1),
/**
* Latest production release
*/
V3_2(V3_2_0),
/**
* Latest development release
*/
V3_1(V3_1_6),
// Older releases
V3_0(V3_0_8),
@Deprecated
LEGACY(V2_6),
PRODUCTION(V3_2),
DEVELOPMENT(V3_2_1_RC3), ;
private final IFeatureAwareVersion _latest;
Main(IFeatureAwareVersion latest) {
_latest = latest;
}
@Override
public String asInDownloadPath() {
return _latest.asInDownloadPath();
}
@Override
public boolean enabled(Feature feature) {
return _latest.enabled(feature);
}
}
}