Skip to content

Commit

Permalink
Issue eclipse#27 choose the name ALL_REMAINING for constant
Browse files Browse the repository at this point in the history
  • Loading branch information
njr-11 committed Oct 24, 2018
1 parent 842fe13 commit b8fdbc6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public interface ManagedExecutorBuilder {
* <p>This set replaces the <code>propagated</code> set that was
* previously specified on the builder instance, if any.</p>
*
* <p>The default set of thread context types is
* {@link ThreadContext#ALL_OTHER}, which includes all available
* <p>The default set of propagated thread context types is
* {@link ThreadContext#ALL_REMAINING}, which includes all available
* thread context types that support capture and propagation to other
* threads, except for those that are explicitly {@link cleared},
* which, by default is {@link ThreadContext#TRANSACTION} context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
* that creates a dependent stage (or that submits a task) and which to
* propagate to the thread where the action or task executes.</p>
*
* <p>The default set of thread context types is
* {@link ThreadContext#ALL_OTHER}, which includes all available
* <p>The default set of propagated thread context types is
* {@link ThreadContext#ALL_REMAINING}, which includes all available
* thread context types that support capture and propagation to other
* threads, except for those that are explicitly {@link cleared},
* which, by default is {@link ThreadContext#TRANSACTION} context,
Expand All @@ -100,7 +100,7 @@
* context type is implicitly or explicitly included in this set
* as well as in the set specified by {@link #cleared}.</p>
*/
String[] propagated() default { ThreadContext.ALL_OTHER };
String[] propagated() default { ThreadContext.ALL_REMAINING };

/**
* <p>Establishes an upper bound on the number of async completion stage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public interface ThreadContext {
* @see ThreadContextBuilder
* @see ThreadContextConfig
*/
static final String ALL_OTHER = "All other";
static final String ALL_REMAINING = "Remaining";

/**
* Identifier for application context. Application context controls the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public static ThreadContextBuilder instance() {
* <p>This set replaces the <code>propagated</code> set that was
* previously specified on the builder instance, if any.</p>
*
* <p>The default set of thread context types is
* {@link ThreadContext#ALL_OTHER}, which includes all available
* <p>The default set of propagated thread context types is
* {@link ThreadContext#ALL_REMAINING}, which includes all available
* thread context types that support capture and propagation to other
* threads, except for those that are explicitly {@link cleared},
* which, by default is {@link ThreadContext#TRANSACTION} context,
Expand Down Expand Up @@ -148,9 +148,12 @@ public static ThreadContextBuilder instance() {
* advanced patterns where it is desirable to leave certain context types
* on the executing thread.</p>
*
* <p>For example, to run under the transaction of the thread of execution:</p>
* <p>For example, to run under the transaction of the thread of execution,
* with security context cleared and all other thread contexts propagated:</p>
* <pre><code> ThreadContext threadContext = ThreadContextBuilder.instance()
* .unchanged(ThreadContext.TRANSACTION)
* .cleared(ThreadContext.SECURITY)
* .propagated(ThreadContext.ALL_REMAINING)
* .build();
* ...
* task = threadContext.withCurrentContext(new MyTransactionlTask());
Expand All @@ -172,9 +175,6 @@ public static ThreadContextBuilder instance() {
*
* @param types types of thread context to leave unchanged on the thread.
* @return the same builder instance upon which this method is invoked.
* @throws IllegalArgumentException if {@link ThreadContext#ALL} is
* included in the 'unchanged' set, because this would otherwise
* render the <code>ThreadContext</code> instance meaningless.
*/
ThreadContextBuilder unchanged(String... types);
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
* that contextualizes an action or task. This context is later
* re-established on the thread(s) where the action or task executes.</p>
*
* <p>The default set of thread context types is
* {@link ThreadContext#ALL_OTHER}, which includes all available
* <p>The default set of propagated thread context types is
* {@link ThreadContext#ALL_REMAINING}, which includes all available
* thread context types that support capture and propagation to other
* threads, except for those that are explicitly {@link cleared},
* which, by default is {@link ThreadContext#TRANSACTION} context,
Expand All @@ -101,7 +101,7 @@
* context type is included in this set as well as in the {@link #cleared}
* set or the {@link #unchanged} set.</p>
*/
String[] value() default { ThreadContext.ALL_OTHER };
String[] value() default { ThreadContext.ALL_REMAINING };

/**
* <p>Defines a set of thread context types that are essentially ignored,
Expand All @@ -121,7 +121,7 @@
* transaction of the thread where the task executes:</p>
* <pre><code> &commat;Inject &commat;ThreadContextConfig(unchanged = ThreadContext.TRANSACTION,
* propagated = ThreadContext.APPLICATION,
* cleared = ThreadContext.ALL_OTHER)
* cleared = ThreadContext.ALL_REMAINING)
* ThreadContext threadContext;
* ...
* task = threadContext.withCurrentContext(new MyTransactionalTask());
Expand Down

0 comments on commit b8fdbc6

Please sign in to comment.