public abstract class AbstractConfigLocator extends Object
XmlConfigLocator
,
YamlConfigLocator
Type | Property and Description |
---|---|
abstract boolean |
locateFromSystem
Locates the configuration file in a system property.
|
Constructor and Description |
---|
AbstractConfigLocator() |
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,
Collection<String> acceptedSuffixes) |
protected boolean |
loadFromSystemPropertyOrFailOnUnacceptedSuffix(String propertyKey,
Collection<String> acceptedSuffixes) |
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 |
locateFromSystemPropertyOrFailOnUnacceptedSuffix()
Locates the configuration file in a system property or throws
HazelcastException if the suffix of the referenced file is
not in the accepted list of the locator. |
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.
|
public abstract boolean locateFromSystemProperty
public InputStream getIn()
public File getConfigurationFile()
public URL getConfigurationUrl()
public boolean isConfigPresent()
public abstract boolean locateFromSystemProperty()
protected abstract boolean locateFromSystemPropertyOrFailOnUnacceptedSuffix()
HazelcastException
if the suffix of the referenced file is
not in the accepted list of the locator.HazelcastException
- if there was a problem locating the
configuration file or the suffix of the
file referenced in the system property
is not an accepted suffixprotected 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)
protected boolean loadFromSystemProperty(String propertyKey, Collection<String> acceptedSuffixes)
protected boolean loadFromSystemPropertyOrFailOnUnacceptedSuffix(String propertyKey, Collection<String> acceptedSuffixes)
Copyright © 2019 Hazelcast, Inc.. All rights reserved.