|
| 1 | +/** |
| 2 | + * Copyright 2024 LinkedIn Corp. All rights reserved. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + */ |
| 14 | + |
| 15 | +package com.github.ambry.store; |
| 16 | + |
| 17 | +/** |
| 18 | + * The types of hydration protocol transitions that can happen. |
| 19 | + * The possible options are :- Blob based and File copy based hydration |
| 20 | + */ |
| 21 | +public enum ReplicationProtocolTransitionType { |
| 22 | + /** |
| 23 | + * Pre restart protocol: NA |
| 24 | + * Bootstrap status: NA |
| 25 | + * Post restart protocol: Blob based |
| 26 | + */ |
| 27 | + NEW_PARTITION_TO_BLOB_BASED_HYDRATION, |
| 28 | + |
| 29 | + /** |
| 30 | + * Pre restart protocol: NA |
| 31 | + * Bootstrap status: NA |
| 32 | + * Post restart protocol: File based |
| 33 | + */ |
| 34 | + NEW_PARTITION_TO_FILE_BASED_HYDRATION, |
| 35 | + |
| 36 | + /** |
| 37 | + * Pre restart protocol: Blob based |
| 38 | + * Bootstrap status: Complete |
| 39 | + * Post restart protocol: File based |
| 40 | + */ |
| 41 | + BLOB_BASED_HYDRATION_COMPLETE_TO_FILE_BASED_HYDRATION, |
| 42 | + |
| 43 | + /** |
| 44 | + * Pre restart protocol: File based |
| 45 | + * Bootstrap status: Complete |
| 46 | + * Post restart protocol: Blob based |
| 47 | + */ |
| 48 | + FILE_BASED_HYDRATION_COMPLETE_TO_BLOB_BASED_HYDRATION, |
| 49 | + |
| 50 | + /** |
| 51 | + * Pre restart protocol: Blob based |
| 52 | + * Bootstrap status: Complete |
| 53 | + * Post restart protocol: Blob based |
| 54 | + */ |
| 55 | + BLOB_BASED_HYDRATION_COMPLETE_TO_BLOB_BASED_HYDRATION, |
| 56 | + |
| 57 | + /** |
| 58 | + * Pre restart protocol: File based |
| 59 | + * Bootstrap status: Complete |
| 60 | + * Post restart protocol: File based |
| 61 | + */ |
| 62 | + FILE_BASED_HYDRATION_COMPLETE_TO_FILE_BASED_HYDRATION, |
| 63 | + |
| 64 | + /** |
| 65 | + * Pre restart protocol: Blob based |
| 66 | + * Bootstrap status: InComplete |
| 67 | + * Post restart protocol: Blob based |
| 68 | + */ |
| 69 | + BLOB_BASED_HYDRATION_INCOMPLETE_TO_BLOB_BASED_HYDRATION, |
| 70 | + |
| 71 | + /** |
| 72 | + * Pre restart protocol: File based |
| 73 | + * Bootstrap status: InComplete |
| 74 | + * Post restart protocol: File based |
| 75 | + */ |
| 76 | + FILE_BASED_HYDRATION_INCOMPLETE_TO_FILE_BASED_HYDRATION, |
| 77 | + |
| 78 | + /** |
| 79 | + * Pre restart protocol: Blob based |
| 80 | + * Bootstrap status: InComplete |
| 81 | + * Post restart protocol: File based |
| 82 | + */ |
| 83 | + BLOB_BASED_HYDRATION_INCOMPLETE_TO_FILE_BASED_HYDRATION, |
| 84 | + |
| 85 | + /** |
| 86 | + * Pre restart protocol: File based |
| 87 | + * Bootstrap status: InComplete |
| 88 | + * Post restart protocol: Blob based |
| 89 | + */ |
| 90 | + FILE_BASED_HYDRATION_INCOMPLETE_TO_BLOB_BASED_HYDRATION |
| 91 | +} |
0 commit comments