Class FileStore.Builder

Enclosing class:
FileStore

Builder class.
  • Constructor Details

    • Builder

      protected Builder()
      Constructor, default settings.
    • Builder

      protected Builder(FileStore.Builder copyFrom)
      Copy constructor.
      Parameters:
      copyFrom - The builder to copy from.
      Cannot be null.
    • Builder

      protected Builder(FileStore copyFrom)
      Copy constructor.
      Parameters:
      copyFrom - The bean to copy from.
      Cannot be null.
  • Method Details

    • build

      public FileStore build()
      Description copied from class: Context.Builder
      Build the object.
      Overrides:
      build in class Context.Builder<FileStore.Builder>
      Returns:
      The built object.
    • charset

      Charset for external files.

      Identifies the charset of external files.

      Parameters:
      value - The new value for this property.
      The default is the first value found:
      Cannot be null.
      Returns:
      This object.
    • copy

      Description copied from class: Context.Builder
      Copy creator.
      Specified by:
      copy in class Context.Builder<FileStore.Builder>
      Returns:
      A new mutable copy of this builder.
    • directory

      Local file system directory.

      Identifies the path of the directory containing the configuration files.

      Parameters:
      value - The new value for this property.
      The default is the first value found:
      • System property "ConfigFileStore.directory"
      • Environment variable "CONFIGFILESTORE_DIRECTORY"
      • ".".

      Cannot be null.
      Returns:
      This object.
    • directory

      Local file system directory.

      Identifies the path of the directory containing the configuration files.

      Parameters:
      value - The new value for this property.
      The default is the first value found:
      • System property "ConfigFileStore.directory"
      • Environment variable "CONFIGFILESTORE_DIRECTORY"
      • "."

      Cannot be null.
      Returns:
      This object.
    • enableWatcher

      Use watcher.

      Use a file system watcher for file system changes.

      Notes:

      The default is the first value found:

      • System property "ConfigFileStore.enableWatcher"
      • Environment variable "CONFIGFILESTORE_ENABLEWATCHER"
      • false.
      Returns:
      This object.
    • extensions

      File extensions.

      Defines what file extensions to search for when the config name does not have an extension.

      Parameters:
      value - The new value for this property. The default is the first value found:
      • System property "ConfigFileStore.extensions"
      • Environment variable "CONFIGFILESTORE_EXTENSIONS"
      • "cfg"

      Cannot be null.
      Returns:
      This object.
    • updateOnWrite

      Update-on-write.

      When enabled, the FileStore.update(String, String) method will be called immediately following calls to FileStore.write(String, String, String) when the contents are changing.
      This allows for more immediate responses to configuration changes on file systems that use polling watchers.
      This may cause double-triggering of ConfigStoreListeners.

      The default is the first value found:

      • System property "ConfigFileStore.updateOnWrite"
      • Environment variable "CONFIGFILESTORE_UPDATEONWRITE"
      • false.
      Returns:
      This object.
    • watcherSensitivity

      Watcher sensitivity.

      Determines how frequently the file system is polled for updates.

      Notes:
      • This relies on internal Sun packages and may not work on all JVMs.
      Parameters:
      value - The new value for this property.
      The default is the first value found:
      • System property "ConfigFileStore.watcherSensitivity"
      • Environment variable "CONFIGFILESTORE_WATCHERSENSITIVITY"
      • WatcherSensitivity.MEDIUM

      Cannot be null.
      Returns:
      This object.