Skip to content

Commit

Permalink
for each annotation, add a listing of all atributes at the end of mai…
Browse files Browse the repository at this point in the history
…n javadoc

Signed-off-by: Ladislav Thon <lthon@redhat.com>
  • Loading branch information
Ladicek committed Mar 31, 2020
1 parent 04bc625 commit 11569d7
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@
/**
* Define bulkhead policy to limit the number of the concurrent calls to an instance.
* <p>
* If this is used together with {@code Asynchronous}, it means thread isolation.
*
* If this is used together with {@code Asynchronous}, it means thread isolation.
*
* Otherwise, it means semaphore isolation.
* <ul>
* <li> Thread isolation - execution happens on a separate thread and the concurrent requests
* are confined in a fixed number of a thread pool.</li>
* <li> Semaphore isolation - execution happens on the calling thread and the concurrent requests
* are constrained by the semaphore count.</li>
* </ul>
*
*
* @see #value()
* @see #waitingTaskQueue()
*
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
*
*/
Expand All @@ -56,16 +59,17 @@
/**
* Specify the maximum number of concurrent calls to an instance. The value must be greater than 0.
* Otherwise, {@link org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException} occurs.
*
*
* @return the limit of the concurrent calls
*/
@Nonbinding
int value() default 10;

/**
* Specify the waiting task queue. This setting only takes effect on asynchronous invocation, achieved by using {@code Asynchronous}.
* The value must be greater than 0.
* Otherwise, {@link org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException} occurs.
*
*
* @return the waiting queue size
*/
@Nonbinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
* </ul>
* If a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception}, non-portable behavior results.
*
* @see #failOn()
* @see #skipOn()
* @see #delay()
* @see #delayUnit()
* @see #requestVolumeThreshold()
* @see #failureRatio()
* @see #successThreshold()
*
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
*/
@Inherited
Expand All @@ -87,7 +95,7 @@
*/
@Nonbinding
Class<? extends Throwable>[] failOn() default {Throwable.class};

/**
* The list of exception types which should not be considered failures.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@
* <ol>
* <li>If the method returns normally (doesn't throw), the result is simply returned.
* <li>Otherwise, if the thrown object is assignable to any value in the {@link #skipOn()} parameter, the thrown object will be rethrown.
* <li>Otherwise, if the thrown object is assignable to any value in the {@link #applyOn()} parameter,
* <li>Otherwise, if the thrown object is assignable to any value in the {@link #applyOn()} parameter,
* the fallback policy, detailed above, will be applied.
* <li>Otherwise the thrown object will be rethrown.
* </ol>
* If a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception}, non-portable behavior results.
*
*
* @see #value()
* @see #fallbackMethod()
* @see #applyOn()
* @see #skipOn()
*
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
*
*
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
Expand All @@ -70,21 +74,21 @@ public Void handle(ExecutionContext context) {
/**
* Specify the fallback class to be used. A new instance of the fallback class
* is returned. The instance is unmanaged. The type parameter of the fallback class must be assignable to the
* return type of the annotated method.
* return type of the annotated method.
* Otherwise, {@link org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException} occurs.
*
*
* @return the fallback class
*/
@Nonbinding
Class<? extends FallbackHandler<?>> value() default DEFAULT.class;

/**
* Specify the method name to fallback to. This method belongs
* to the same class as the method to fallback.
* The method must have the exact same arguments as the method being annotated.
* The method return type must be assignable to the return type of the method the fallback is for.
* The method return type must be assignable to the return type of the method the fallback is for.
* Otherwise, {@link org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException} must be thrown.
*
*
* @return the local method to fallback to
*/
@Nonbinding
Expand All @@ -93,20 +97,20 @@ public Void handle(ExecutionContext context) {
/**
* The list of exception types which should trigger Fallback
* <p>
* Note that if a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception},
* Note that if a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception},
* non-portable behavior results.
*
* @return the exception types which should trigger Fallback
*/
@Nonbinding
Class<? extends Throwable>[] applyOn() default {Throwable.class};

/**
* The list of exception types which should <i>not</i> trigger Fallback
* <p>
* This list takes priority over the types listed in {@link #applyOn}
* <p>
* Note that if a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception},
* Note that if a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception},
* non-portable behavior results.
*
* @return the exception types which should not trigger Fallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
* <li>Otherwise the thrown object is rethrown.
* </ol>
* If a method throws a {@link Throwable} which is not an {@link Error} or {@link Exception}, non-portable behavior results.
*
* @see #maxRetries()
* @see #delay()
* @see #delayUnit()
* @see #maxDuration()
* @see #durationUnit()
* @see #jitter()
* @see #jitterDelayUnit()
* @see #retryOn()
* @see #abortOn()
*
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
* @author John Ament
*/
Expand All @@ -53,7 +64,7 @@

/**
* The max number of the retries.
*
*
* @return the max number of retries. -1 means retry forever. The value must be greater than or equal to -1.
*
*/
Expand All @@ -62,31 +73,31 @@

/**
* The delay between retries. Defaults to 0. The value must be greater than or equal to 0.
*
*
* @return the delay time
*/
@Nonbinding
long delay() default 0;

/**
* The unit for {@link #delay}. Defaults to {@link java.time.temporal.ChronoUnit#MILLIS} if not set.
*
*
* @return the delay unit
*/
@Nonbinding
ChronoUnit delayUnit() default ChronoUnit.MILLIS;

/**
* The max duration. The max duration must be greater than the delay duration if set. 0 means not set.
*
*
* @return the maximum duration to perform retries for
*/
@Nonbinding
long maxDuration() default 180000;

/**
* The duration unit for {@link #maxDuration}. Defaults to {@link java.time.temporal.ChronoUnit#MILLIS} if not set.
*
* The duration unit for {@link #maxDuration}. Defaults to {@link java.time.temporal.ChronoUnit#MILLIS} if not set.
*
* @return the duration unit
*/
@Nonbinding
Expand All @@ -108,7 +119,7 @@

/**
* The delay unit for {@link #jitter}. Defaults to {@link java.time.temporal.ChronoUnit#MILLIS} if not set.
*
*
* @return the jitter delay unit
*/
@Nonbinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
/**
* The annotation to define a method execution timeout.
*
* @see #value()
* @see #unit()
*
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
*/
@Inherited
Expand All @@ -44,15 +47,15 @@
/**
* The timeout value. The value must be greater than or equal to 0. 0 means no timeout configured.
* Otherwise, {@link org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException} occurs.
*
*
* @return the timeout value
*/
@Nonbinding
long value() default 1000;

/**
* The timeout unit. Defaults to {@link java.time.temporal.ChronoUnit#MILLIS}.
*
*
* @return the timeout unit
*/
@Nonbinding
Expand Down

0 comments on commit 11569d7

Please sign in to comment.