Package io.quarkus.registry.config
Interface RegistryConfig
-
- All Known Subinterfaces:
RegistryConfig.Mutable
- All Known Implementing Classes:
RegistryConfigImpl,RegistryConfigImpl.Builder
public interface RegistryConfigClient side registry configuration containing information how to communicate and resolve various catalogs from the registry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceRegistryConfig.Mutable
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static RegistryConfig.Mutablebuilder()static RegistryConfigdefaultConfig()Get the default registrystatic RegistryConfigfromFile(Path path)Read config from the specified fileRegistryDescriptorConfiggetDescriptor()How to get the descriptor from the registry.Map<String,Object>getExtra()Custom registry client configuration.StringgetId()Registry ID.RegistryMavenConfiggetMaven()Registry client Maven related configuration, such as repository URL, etc.RegistryNonPlatformExtensionsConfiggetNonPlatformExtensions()How to get catalogs of non-platform extensions from the registry.RegistryPlatformsConfiggetPlatforms()How get platform catalogs from the registry.RegistryQuarkusVersionsConfiggetQuarkusVersions()Registry specific Quarkus version filtering configuration.StringgetUpdatePolicy()How often (if ever) the locally cached catalogs provided by the registry should be refreshed.booleanisEnabled()Whether this registry should be included in the active registry list.default RegistryConfig.Mutablemutable()static RegistryConfig.MutablemutableFromFile(Path path)Read config from the specified filedefault voidpersist(Path p)Persist this configuration to the specified file.
-
-
-
Method Detail
-
getId
String getId()
Registry ID. Mainly used in the logging and error messages to refer to a specific registry.- Returns:
- registry id, never null
-
isEnabled
boolean isEnabled()
Whether this registry should be included in the active registry list. If the registry is disabled the client won't be sending any requests to it.- Returns:
- true, if the registry is enabled, otherwise - false
-
getUpdatePolicy
String getUpdatePolicy()
How often (if ever) the locally cached catalogs provided by the registry should be refreshed. The value returned by the method should currently bealways,daily(default),interval:XXX(in minutes) ornever(only if it doesn't exist locally).- Returns:
- update policy
-
getDescriptor
RegistryDescriptorConfig getDescriptor()
How to get the descriptor from the registry. A registry descriptor is the default client configuration for the registry that can be customized on the client side, if necessary.- Returns:
- registry descriptor related configuration
-
getPlatforms
RegistryPlatformsConfig getPlatforms()
How get platform catalogs from the registry.- Returns:
- platform catalog related configuration
-
getNonPlatformExtensions
RegistryNonPlatformExtensionsConfig getNonPlatformExtensions()
How to get catalogs of non-platform extensions from the registry.- Returns:
- non-platform extension catalog related configuration
-
getMaven
RegistryMavenConfig getMaven()
Registry client Maven related configuration, such as repository URL, etc.- Returns:
- registry client Maven related configuration
-
getQuarkusVersions
RegistryQuarkusVersionsConfig getQuarkusVersions()
Registry specific Quarkus version filtering configuration. For example, a given registry may provide platform and extension information that are based on specific versions of Quarkus core. Properly configured configured may reduce the amount of unnecessary remote registry requests.- Returns:
- Quarkus version filtering configuration
-
getExtra
Map<String,Object> getExtra()
Custom registry client configuration.- Returns:
- custom registry client configuration
-
mutable
default RegistryConfig.Mutable mutable()
- Returns:
- a mutable copy of this configuration
-
persist
default void persist(Path p) throws IOException
Persist this configuration to the specified file.- Parameters:
p- Target path- Throws:
IOException- if the specified file can not be written to.
-
defaultConfig
static RegistryConfig defaultConfig()
Get the default registry
-
builder
static RegistryConfig.Mutable builder()
- Returns:
- a new mutable instance
-
fromFile
static RegistryConfig fromFile(Path path) throws IOException
Read config from the specified file- Parameters:
path- File to read from (yaml or json)- Returns:
- read-only RegistryConfig object
- Throws:
IOException
-
mutableFromFile
static RegistryConfig.Mutable mutableFromFile(Path path) throws IOException
Read config from the specified file- Parameters:
path- File to read from (yaml or json)- Returns:
- mutable (possibly incomplete) RegistryConfig object
- Throws:
IOException
-
-