ScheduledAnnotationBeanPostProcessor to support reactive
cases without a dependency on optional classes.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ScheduledAnnotationReactiveSupport.SubscribingRunnable
Utility implementation of |
| private static class | ScheduledAnnotationReactiveSupport.TrackingSubscriber
A |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final boolean | |
| private static final Log | |
| pack-priv static final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static Runnable | createSubscriptionRunnable(Method method, Object targetBean, Scheduled scheduled, Supplier<ObservationRegistry> observationRegistrySupplier, List<Runnable> subscriptionTrackerRegistry)
Create a |
| pack-priv static Publisher | getPublisherFor(Method method, Object bean)
Turn the invocation of the provided |
| public static boolean |
| coroutinesReactorPresent | back to summary |
|---|---|
| pack-priv static final boolean coroutinesReactorPresent | |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| reactorPresent | back to summary |
|---|---|
| pack-priv static final boolean reactorPresent | |
| ScheduledAnnotationReactiveSupport | back to summary |
|---|---|
| pack-priv ScheduledAnnotationReactiveSupport() | |
| createSubscriptionRunnable | back to summary |
|---|---|
| public static Runnable createSubscriptionRunnable(Method method, Object targetBean, Scheduled scheduled, Supplier<ObservationRegistry> observationRegistrySupplier, List<Runnable> subscriptionTrackerRegistry) Create a Note that the reactive method is invoked once, but the resulting In the case of a fixed-delay configuration, the subscription inside the
| |
| getPublisherFor | back to summary |
|---|---|
| pack-priv static Publisher Turn the invocation of the provided The | |
| isReactive | back to summary |
|---|---|
| public static boolean isReactive(Method method) Checks that if the method is reactive, it can be scheduled. Methods are considered
eligible for reactive scheduling if they either return an instance of a type that
can be converted to For scheduling of Kotlin suspending functions, the Coroutine-Reactor bridge
| |
Runnable that subscribes to a Publisher
or subscribes-then-blocks if shouldBlock is set to true.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Supplier | |
| private static final ScheduledTaskObservationConvention | |
| pack-priv final Supplier | |
| private final Publisher | |
| private final String | |
| pack-priv final boolean | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv | SubscribingRunnable(Publisher<?> publisher, boolean shouldBlock, String qualifier, List<Runnable> subscriptionTrackerRegistry, Supplier<ObservationRegistry> observationRegistrySupplier, Supplier<ScheduledTaskObservationContext> contextSupplier)
|
| Modifier and Type | Method and Description |
|---|---|
| public String | getQualifier()
Overrides default org. |
| public void | |
| private void | subscribe(ScheduledAnnotationReactiveSupport.
|
| contextSupplier | back to summary |
|---|---|
| pack-priv final Supplier<ScheduledTaskObservationContext> contextSupplier | |
| DEFAULT_CONVENTION | back to summary |
|---|---|
| private static final ScheduledTaskObservationConvention DEFAULT_CONVENTION | |
| observationRegistrySupplier | back to summary |
|---|---|
| pack-priv final Supplier<ObservationRegistry> observationRegistrySupplier | |
| publisher | back to summary |
|---|---|
| private final Publisher<?> publisher | |
| qualifier | back to summary |
|---|---|
| private final String qualifier
| |
| shouldBlock | back to summary |
|---|---|
| pack-priv final boolean shouldBlock | |
| subscriptionTrackerRegistry | back to summary |
|---|---|
| private final List<Runnable> subscriptionTrackerRegistry | |
| SubscribingRunnable | back to summary |
|---|---|
| pack-priv SubscribingRunnable(Publisher<?> publisher, boolean shouldBlock, String qualifier, List<Runnable> subscriptionTrackerRegistry, Supplier<ObservationRegistry> observationRegistrySupplier, Supplier<ScheduledTaskObservationContext> contextSupplier) | |
| getQualifier | back to summary |
|---|---|
| public String getQualifier() Overrides default org. Doc from org. Return a qualifier associated with this Runnable. The default implementation returns May be used for custom purposes depending on the scheduler implementation.
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| subscribe | back to summary |
|---|---|
| private void subscribe(ScheduledAnnotationReactiveSupport. | |
Subscriber which keeps track of its Subscription and exposes the
capacity to cancel the subscription as a Runnable. Can optionally support
blocking if a CountDownLatch is supplied during construction.
| Modifier and Type | Field and Description |
|---|---|
| private final CountDownLatch | |
| private final Observation | |
| private Subscription | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | TrackingSubscriber(List<Runnable> subscriptionTrackerRegistry, Observation observation, CountDownLatch latch)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | onError(Throwable
the throwable signaled ex)Implements org. |
| public void | onNext(Object
the element signaled obj)Implements org. Publisher in response to requests to Subscription#request(long).
|
| public void | onSubscribe(Subscription
the subscription)Subscription that allows requesting data via Subscription#request(long)Implements org. Publisher#subscribe(Subscriber).
|
| public void |
| blockingLatch | back to summary |
|---|---|
| private final CountDownLatch blockingLatch
| |
| observation | back to summary |
|---|---|
| private final Observation observation | |
| subscription | back to summary |
|---|---|
| private Subscription subscription
| |
| subscriptionTrackerRegistry | back to summary |
|---|---|
| private final List<Runnable> subscriptionTrackerRegistry | |
| TrackingSubscriber | back to summary |
|---|---|
| pack-priv TrackingSubscriber(List<Runnable> subscriptionTrackerRegistry, Observation observation) | |
| TrackingSubscriber | back to summary |
|---|---|
| pack-priv TrackingSubscriber(List<Runnable> subscriptionTrackerRegistry, Observation observation, CountDownLatch latch) | |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements org. Doc from org. Successful terminal state.
No further events will be sent even if
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable ex) Implements org. Doc from org. Failed terminal state.
No further events will be sent even if | |
| onNext | back to summary |
|---|---|
| public void onNext(Object obj) Implements org. Doc from org. Data notification sent by the | |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Subscription subscription) Implements org. Doc from org. Invoked after calling
No data will start flowing until
It is the responsibility of this
The
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |