com.hazelcast.config

## Class AbstractConfigLocator

- java.lang.Object
- - com.hazelcast.config.AbstractConfigLocator

- Direct Known Subclasses:
    XmlClientConfigLocator, XmlClientFailoverConfigLocator, XmlConfigLocator, YamlClientConfigLocator, YamlClientFailoverConfigLocator, YamlConfigLocator

      public abstract class AbstractConfigLocator
      extends Object

  Abstract base class for config locators.
  See Also:
    `XmlConfigLocator`, `YamlConfigLocator`

- - ### Property Summary

    All Methods Instance Methods Abstract Methods
    Type | Property and Description
    --- | ---
    `abstract boolean` | `locateFromSystem` Locates the configuration file in a system property.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractConfigLocator()`
    `protected` | `AbstractConfigLocator(boolean failIfSysPropWithNotExpectedSuffix)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Property Detail

    - #### locateFromSystem

          public abstract boolean locateFromSystemProperty

      Locates the configuration file in a system property.

  - ### Constructor Detail

    - #### AbstractConfigLocator

          protected AbstractConfigLocator()

    - #### AbstractConfigLocator

          protected AbstractConfigLocator(boolean failIfSysPropWithNotExpectedSuffix)

  - ### Method Detail

    - #### getIn

          public InputStream getIn()

    - #### getConfigurationFile

          public File getConfigurationFile()

    - #### getConfigurationUrl

          public URL getConfigurationUrl()

    - #### isConfigPresent

          public boolean isConfigPresent()

    - #### locateFromSystemProperty

          public abstract boolean locateFromSystemProperty()

      Locates the configuration file in a system property.

    - #### locateInWorkDir

          protected abstract boolean locateInWorkDir()

      Locates the configuration file in the working directory.
      Returns:
        true if the configuration file is found in the working directory
      Throws:
        `HazelcastException` - if there was a problem locating the configuration file

    - #### locateOnClasspath

          protected abstract boolean locateOnClasspath()

      Locates the configuration file on the classpath.
      Returns:
        true if the configuration file is found on the classpath
      Throws:
        `HazelcastException` - if there was a problem locating the configuration file

    - #### locateDefault

          public abstract boolean locateDefault()

      Locates the default configuration file.
      Returns:
        true always, indicating the default configuration file is found
      Throws:
        `HazelcastException` - if there was a problem locating the default configuration file

    - #### locateEverywhere

          public boolean locateEverywhere()

    - #### locateInWorkDirOrOnClasspath

          public boolean locateInWorkDirOrOnClasspath()

    - #### loadDefaultConfigurationFromClasspath

          protected void loadDefaultConfigurationFromClasspath(String defaultConfigFile)

    - #### loadConfigurationFromClasspath

          protected boolean loadConfigurationFromClasspath(String configFileName)

    - #### loadFromWorkingDirectory

          protected boolean loadFromWorkingDirectory(String configFilePath)

    - #### loadFromSystemProperty

          protected boolean loadFromSystemProperty(String propertyKey,
                                                   String... expectedExtensions)

Copyright © 2019. All rights reserved.