Class FileStore.Builder
- Enclosing class:
- FileStore
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor, default settings.protectedCopy constructor.protectedBuilder(FileStore.Builder copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the object.Charset for external files.copy()Copy creator.Local file system directory.Local file system directory.Use watcher.extensions(String value) File extensions.Update-on-write.Watcher sensitivity.Methods inherited from class org.apache.juneau.marshall.Context.Builder
annotations, annotations, apply, applyAnnotations, applyAnnotations, asSubtype, build, cache, canApply, copyOrNull, debug, debug, getApplied, getType, hashKey, impl, isDebug, registerBuilders, self, type
-
Constructor Details
-
Builder
protected Builder()Constructor, default settings. -
Builder
Copy constructor.- Parameters:
copyFrom- The builder to copy from.
Cannot benull .
-
Builder
Copy constructor.- Parameters:
copyFrom- The bean to copy from.
Cannot benull .
-
-
Method Details
-
build
Description copied from class:Context.BuilderBuild the object.- Overrides:
buildin classContext.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:- System property
"ConfigFileStore.charset" - Environment variable
"CONFIGFILESTORE_CHARSET" Charset.defaultCharset()
Cannot benull .- System property
- Returns:
- This object.
-
copy
Description copied from class:Context.BuilderCopy creator.- Specified by:
copyin classContext.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 benull .- System property
- 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 benull .- System property
- Returns:
- This object.
-
enableWatcher
Use watcher.Use a file system watcher for file system changes.
Notes:
- Calling
FileStore.close()closes the watcher.
The default is the first value found:
- System property
"ConfigFileStore.enableWatcher" - Environment variable
"CONFIGFILESTORE_ENABLEWATCHER" false .
- Returns:
- This object.
- Calling
-
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 benull .- System property
- Returns:
- This object.
-
updateOnWrite
Update-on-write.When enabled, the
FileStore.update(String, String)method will be called immediately following calls toFileStore.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 ofConfigStoreListeners.The default is the first value found:
- System property
"ConfigFileStore.updateOnWrite" - Environment variable
"CONFIGFILESTORE_UPDATEONWRITE" false .
- Returns:
- This object.
- System property
-
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 benull .- System property
- Returns:
- This object.
-