Package org.keycloak.compatibility
Class KeycloakCompatibilityMetadataProvider
java.lang.Object
org.keycloak.compatibility.KeycloakCompatibilityMetadataProvider
- All Implemented Interfaces:
CompatibilityMetadataProvider
public class KeycloakCompatibilityMetadataProvider
extends Object
implements CompatibilityMetadataProvider
A
CompatibilityMetadataProvider
implementation to provide the Keycloak version.-
Field Summary
FieldsFields inherited from interface org.keycloak.compatibility.CompatibilityMetadataProvider
DEFAULT_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.compatibility.CompatibilityMetadataProvider
priority
-
Field Details
-
ID
- See Also:
-
VERSION_KEY
- See Also:
-
-
Constructor Details
-
KeycloakCompatibilityMetadataProvider
public KeycloakCompatibilityMetadataProvider() -
KeycloakCompatibilityMetadataProvider
-
-
Method Details
-
metadata
Description copied from interface:CompatibilityMetadataProvider
Provides the metadata to be persisted.If an empty
Map
is returned, no information about this implementation will be persisted. Anull
return value is not supported, and it will interrupt the process.- Specified by:
metadata
in interfaceCompatibilityMetadataProvider
- Returns:
- The metadata required by this provider to determine if a rolling update is possible.
-
isCompatible
Description copied from interface:CompatibilityMetadataProvider
It compares the current metadata withother
from another deployment.The default implementation will allow a rolling update if the metadata from the current server is equal to the
other
. Implementations can overwrite this method as required.- Specified by:
isCompatible
in interfaceCompatibilityMetadataProvider
- Parameters:
other
- The other deployment metadata. It only contains the metadata from this implementation.- Returns:
- The
CompatibilityResult
with the outcome. - See Also:
-
getId
- Specified by:
getId
in interfaceCompatibilityMetadataProvider
- Returns:
- The ID of this implementation. It should be unique as implementation with the same ID and priority is not valid.
-