Package io.aeron.cluster
Class AppVersionValidator
java.lang.Object
io.aeron.cluster.AppVersionValidator
Class to be used for determining AppVersion compatibility.
Default is to use SemanticVersion major version for checking compatibility.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AppVersionValidatorSingleton instance ofAppVersionValidatorversion which can be used to avoid allocation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisVersionCompatible(int contextAppVersion, int appVersionUnderTest) Check version compatibility between configured context appVersion and appVersion in new leadership term or snapshot.
-
Field Details
-
SEMANTIC_VERSIONING_VALIDATOR
Singleton instance ofAppVersionValidatorversion which can be used to avoid allocation.
-
-
Constructor Details
-
AppVersionValidator
public AppVersionValidator()
-
-
Method Details
-
isVersionCompatible
public boolean isVersionCompatible(int contextAppVersion, int appVersionUnderTest) Check version compatibility between configured context appVersion and appVersion in new leadership term or snapshot.- Parameters:
contextAppVersion- configured appVersion value from context.appVersionUnderTest- to check against configured appVersion.- Returns:
- true for compatible or false for not compatible.
-