deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1745102 - in /deltaspike/site/trunk/content/documentation: configuration.html data.html
Date Mon, 23 May 2016 00:28:34 GMT
Author: johndament
Date: Mon May 23 00:28:33 2016
New Revision: 1745102

Site checkin for project Apache DeltaSpike Documentation


Modified: deltaspike/site/trunk/content/documentation/configuration.html
--- deltaspike/site/trunk/content/documentation/configuration.html (original)
+++ deltaspike/site/trunk/content/documentation/configuration.html Mon May 23 00:28:33 2016
@@ -479,6 +479,7 @@ cached in the ConfigResolver but might b
 This makes the overall calculation a bit slower, but allows for values
 to change dynamically if someone likes to for example implement a
 <code>JmxConfigSource</code> (not yet part of DeltaSpike, but easily implementable).
+You can also use the <a href="#DynamicReloading">TypedResolver</a> with the <code>cacheFor(TimeUnit,
long)</code> setting to cache the resolved values on the caller side.
@@ -617,6 +618,19 @@ connecTo( urlConfig.getValue() );</code>
 <p>The sample above will log any value changes in the configuration (<code>logChanges(true)</code>)
and internally cache the configured value for 5 minutes (<code>cacheFor(TimeUnit.MINUTES,
 Only after that time the configured value will get evaluate again.</p>
+<div class="admonitionblock tip">
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+<td class="content">
+Note that the 'cache' is only held within the very TypedResolver instance.
+If you use different <code>TypedResolver</code> instances (e.g. in different
classes) then you might get different cache timeouts.
 <div class="sect2">

Modified: deltaspike/site/trunk/content/documentation/data.html
--- deltaspike/site/trunk/content/documentation/data.html (original)
+++ deltaspike/site/trunk/content/documentation/data.html Mon May 23 00:28:33 2016
@@ -946,6 +946,27 @@ you will notice early in case you have a
 <div class="sect2">
+<h3 id="_query_limits">Query Limits</h3>
+<div class="paragraph">
+<p>Starting with Apache DeltaSpike 1.6.2, you can apply query limits using method
+expressions.  They can be applied using <code>First</code> or <code>Top</code>
keywords, in a method
+like this</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@Repository</span>
+<span class="directive">public</span> <span class="type">interface</span>
<span class="class">PersonRepository</span> <span class="directive">extends</span>
EntityRepository&lt;Person, <span class="predefined-type">Long</span>&gt;
+    <span class="predefined-type">List</span>&lt;Person&gt; findFirst2ByLastNameOrderByAgeAscLastNameDesc(<span
class="predefined-type">String</span> lastName);
+    <span class="predefined-type">List</span>&lt;Person&gt; findTop2ByLastNameOrderByAgeAscLastNameDesc(<span
class="predefined-type">String</span> lastName);
+<div class="sect2">
 <h3 id="_nested_properties">Nested Properties</h3>
 <div class="paragraph">
 <p>To create a comparison on a nested property, the traversal parts can be
@@ -2237,6 +2258,7 @@ provider when persisting / updating the
 <ul class="sectlevel2">
 <li><a href="#_using_method_expressions">Using Method Expressions</a></li>
 <li><a href="#_query_ordering">Query Ordering</a></li>
+<li><a href="#_query_limits">Query Limits</a></li>
 <li><a href="#_nested_properties">Nested Properties</a></li>
 <li><a href="#_query_options">Query Options</a></li>
 <li><a href="#_method_prefix">Method Prefix</a></li>

View raw message