public abstract class AbstractConfigLocator extends Object
XmlConfigLocator
,
YamlConfigLocator
Modifier | Constructor and Description |
---|---|
protected |
AbstractConfigLocator() |
protected |
AbstractConfigLocator(boolean failIfSysPropWithNotExpectedSuffix) |
Modifier and Type | Method and Description |
---|---|
File |
getConfigurationFile() |
URL |
getConfigurationUrl() |
InputStream |
getIn() |
boolean |
isConfigPresent() |
protected boolean |
loadConfigurationFromClasspath(String configFileName) |
protected void |
loadDefaultConfigurationFromClasspath(String defaultConfigFile) |
protected boolean |
loadFromSystemProperty(String propertyKey,
String... expectedExtensions) |
protected boolean |
loadFromWorkingDirectory(String configFilePath) |
abstract boolean |
locateDefault()
Locates the default configuration file.
|
boolean |
locateEverywhere() |
abstract boolean |
locateFromSystemProperty()
Locates the configuration file in a system property.
|
protected abstract boolean |
locateInWorkDir()
Locates the configuration file in the working directory.
|
boolean |
locateInWorkDirOrOnClasspath() |
protected abstract boolean |
locateOnClasspath()
Locates the configuration file on the classpath.
|
protected AbstractConfigLocator()
protected AbstractConfigLocator(boolean failIfSysPropWithNotExpectedSuffix)
public InputStream getIn()
public File getConfigurationFile()
public URL getConfigurationUrl()
public boolean isConfigPresent()
public abstract boolean locateFromSystemProperty()
HazelcastException
- if there was a problem locating the
configuration fileprotected abstract boolean locateInWorkDir()
HazelcastException
- if there was a problem locating the
configuration fileprotected abstract boolean locateOnClasspath()
HazelcastException
- if there was a problem locating the
configuration filepublic abstract boolean locateDefault()
HazelcastException
- if there was a problem locating the
default configuration filepublic boolean locateEverywhere()
public boolean locateInWorkDirOrOnClasspath()
protected void loadDefaultConfigurationFromClasspath(String defaultConfigFile)
protected boolean loadConfigurationFromClasspath(String configFileName)
protected boolean loadFromWorkingDirectory(String configFilePath)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.