Class HotRodVersionUtils
java.lang.Object
org.keycloak.models.map.storage.hotRod.common.HotRodVersionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanadjacentVersions(Integer version1, Integer version2) Decides whetherversion1andversion2are adjacent values (there are no versions between these)static booleanisVersion2NewerThanVersion1(Integer version1, Integer version2) Decides whetherversion1is older thanversion2static IntegerparseSchemaVersionFromProtoFile(String protoFile) Searches givenprotoFilestring for occurrences of string schema-version: X, where X is version of current schema in theprotoFilestring
-
Constructor Details
-
HotRodVersionUtils
public HotRodVersionUtils()
-
-
Method Details
-
isVersion2NewerThanVersion1
Decides whetherversion1is older thanversion2- Parameters:
version1- first versionversion2- second version- Returns:
- returns true when
version1is older thanversion2and false when versions are equal orversion2is older thanversion1
-
adjacentVersions
Decides whetherversion1andversion2are adjacent values (there are no versions between these)- Parameters:
version1- first versionversion2- second version- Returns:
- returns true when
version1andversion2are adjacent, false otherwise
-
parseSchemaVersionFromProtoFile
Searches givenprotoFilestring for occurrences of string schema-version: X, where X is version of current schema in theprotoFilestring- Parameters:
protoFile- schema to search- Returns:
- Integer object representing version of schema within
protoFileornullif not found - Throws:
IllegalStateException- if file contains more than one version definitions
-