-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Configuration.refresh() for manual refreshing of ConfigurationSou…
…rce plugins
- Loading branch information
Showing
10 changed files
with
153 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
avaje-config/src/main/java/io/avaje/config/CoreComponents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package io.avaje.config; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
final class CoreComponents { | ||
|
||
private final ModificationEventRunner runner; | ||
private final ConfigurationLog log; | ||
private final Parsers parsers; | ||
private final List<ConfigurationSource> sources; | ||
|
||
CoreComponents(ModificationEventRunner runner, ConfigurationLog log, Parsers parsers, List<ConfigurationSource> sources) { | ||
this.runner = runner; | ||
this.log = log; | ||
this.parsers = parsers; | ||
this.sources = sources; | ||
} | ||
|
||
CoreComponents() { | ||
this.runner = new CoreConfiguration.ForegroundEventRunner(); | ||
this.log = new DefaultConfigurationLog(); | ||
this.parsers = new Parsers(); | ||
this.sources = Collections.emptyList(); | ||
} | ||
|
||
Parsers parsers() { | ||
return parsers; | ||
} | ||
|
||
ConfigurationLog log() { | ||
return log; | ||
} | ||
|
||
ModificationEventRunner runner() { | ||
return runner; | ||
} | ||
|
||
List<ConfigurationSource> sources() { | ||
return sources; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters