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