deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject deltaspike git commit: improve TypedResolver docs
Date Thu, 19 May 2016 06:40:18 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 172983ff1 -> 351b56369


improve TypedResolver docs


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/351b5636
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/351b5636
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/351b5636

Branch: refs/heads/master
Commit: 351b563693ca0faa5bf4e9e74e53aeed32c53974
Parents: 172983f
Author: Mark Struberg <struberg@apache.org>
Authored: Thu May 19 08:38:42 2016 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Thu May 19 08:38:42 2016 +0200

----------------------------------------------------------------------
 documentation/src/main/asciidoc/configuration.adoc | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/351b5636/documentation/src/main/asciidoc/configuration.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/configuration.adoc b/documentation/src/main/asciidoc/configuration.adoc
index 89f199c..24af969 100644
--- a/documentation/src/main/asciidoc/configuration.adoc
+++ b/documentation/src/main/asciidoc/configuration.adoc
@@ -141,6 +141,7 @@ cached in the ConfigResolver but might be cached in the ConfigSources.
 This makes the overall calculation a bit slower, but allows for values
 to change dynamically if someone likes to for example implement a
 `JmxConfigSource` (not yet part of DeltaSpike, but easily implementable).
+You can also use the <<configuration.adoc#DynamicReloading,TypedResolver>> with
the `cacheFor(TimeUnit, long)` setting to cache the resolved values on the caller side.
 
 === Variable Replacement in Configured Values
 
@@ -245,6 +246,9 @@ connecTo( urlConfig.getValue() );
 The sample above will log any value changes in the configuration (`logChanges(true)`) and
internally cache the configured value for 5 minutes (`cacheFor(TimeUnit.MINUTES, 5)`).
 Only after that time the configured value will get evaluate again.
 
+TIP: Note that the 'cache' is only held within the very TypedResolver instance.
+If you use different `TypedResolver` instances (e.g. in different classes) then you might
get different cache timeouts.
+
 === Injection of configured values into beans using @ConfigProperty
 
 DeltaSpike provides a way to inject configured values into your code via the qualifier `@ConfigProperty`.


Mime
View raw message