Class DirectoryConfigProvider
java.lang.Object
org.apache.kafka.common.config.provider.DirectoryConfigProvider
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- ConfigProvider,- Configurable
An implementation of 
ConfigProvider based on a directory of files.
 Property keys correspond to the names of the regular (i.e. non-directory)
 files in a directory given by the path parameter.
 Property values are taken from the file contents corresponding to each key.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voidConfigure this class with the given key-value pairsRetrieves the data contained in regular files in the directory given bypath.Retrieves the data contained in the regular files named bykeysin the directory given bypath.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.common.config.provider.ConfigProvidersubscribe, unsubscribe, unsubscribeAll
- 
Field Details- 
ALLOWED_PATHS_CONFIG- See Also:
 
- 
ALLOWED_PATHS_DOC- See Also:
 
 
- 
- 
Constructor Details- 
DirectoryConfigProviderpublic DirectoryConfigProvider()
 
- 
- 
Method Details- 
configureDescription copied from interface:ConfigurableConfigure this class with the given key-value pairs- Specified by:
- configurein interface- Configurable
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
- 
getRetrieves the data contained in regular files in the directory given bypath. Non-regular files (such as directories) in the given directory are silently ignored.- Specified by:
- getin interface- ConfigProvider
- Parameters:
- path- the directory where data files reside.
- Returns:
- the configuration data.
 
- 
getRetrieves the data contained in the regular files named bykeysin the directory given bypath. Non-regular files (such as directories) in the given directory are silently ignored.- Specified by:
- getin interface- ConfigProvider
- Parameters:
- path- the directory where data files reside.
- keys- the keys whose values will be retrieved.
- Returns:
- the configuration data.
 
 
-