Class EventPublishHelper
-
- All Implemented Interfaces:
public class EventPublishHelperApplicationEventPublisher helper. Generally used for non-transactional Event, the main function: (1) async publish event (2) IDE hit and navigation (3) wrap hazelcast topic(#HazelcastTopic) to SpringEvent Note, do NOT use ApplicationEventMulticaster in async, or handle exception, that would break Spring's default synchronization mechanism.- Since:
2021-06-07
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public final static ApplicationEventPublisherSyncSpringpublic final static ApplicationEventPublisherAsyncSpringpublic final static ApplicationEventPublisherAsyncGlobalpublic final static ApplicationEventPublisherAsyncWidely
-
Constructor Summary
Constructors Constructor Description EventPublishHelper()
-
Method Summary
Modifier and Type Method Description static voidprepareAsyncExecutor(@NotNull() Executor async)static voidprepareSpringPublisher(@NotNull() ApplicationEventPublisher spring)static voidprepareGlobalPublisher(@NotNull() ApplicationEventPublisher global)static booleanisPreparedGlobal()whether global is prepared static booleanisPreparedAsync()whether app async is prepared static booleanisPreparedSync()whether app sync is prepared static booleanisPrepared()whether this helper is fully prepared -
-
Method Detail
-
prepareAsyncExecutor
static void prepareAsyncExecutor(@NotNull() Executor async)
-
prepareSpringPublisher
static void prepareSpringPublisher(@NotNull() ApplicationEventPublisher spring)
-
prepareGlobalPublisher
static void prepareGlobalPublisher(@NotNull() ApplicationEventPublisher global)
-
isPreparedGlobal
static boolean isPreparedGlobal()
whether global is prepared
-
isPreparedAsync
static boolean isPreparedAsync()
whether app async is prepared
-
isPreparedSync
static boolean isPreparedSync()
whether app sync is prepared
-
isPrepared
static boolean isPrepared()
whether this helper is fully prepared
-
-
-
-