Interface CompatibilityMetadataProvider
- All Known Implementing Classes:
AbstractCompatibilityMetadataProvider,CachingEmbeddedMetadataProvider,CachingRemoteMetadataProvider,FeatureCompatibilityMetadataProvider,JGroupsCertificatesMetadataProvider,KeycloakCompatibilityMetadataProvider
Implementations should return all metadata required to determine if it is possible to update from one Keycloak deployment to another in a compatible manner. Metadata key/value pairs may be added or removed in a subsequent version, so it's necessary for implementations to handle missing metadata gracefully.
The CompatibilityResult determines if a rolling update is possible. Factory methods are present with default
implementations of CompatibilityResult.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY- See Also:
-
-
Method Details
-
metadata
Provides the metadata to be persisted.If an empty
Mapis returned, no information about this implementation will be persisted. Anullreturn value is not supported, and it will interrupt the process.- Returns:
- The metadata required by this provider to determine if a rolling update is possible.
-
isCompatible
It compares the current metadata withotherfrom 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.- Parameters:
other- The other deployment metadata. It only contains the metadata from this implementation.- Returns:
- The
CompatibilityResultwith the outcome. - See Also:
-
priority
default int priority()- Returns:
- The priority. Only relevant is multiple implementation has the same
getId()and/or to replace the default implementation shipped in Keycloak.
-
getId
String getId()- Returns:
- The ID of this implementation. It should be unique as implementation with the same ID and priority is not valid.
-