Package org.ametys.core.observation
Interface AsyncObserver
-
- All Superinterfaces:
Observer
- All Known Implementing Classes:
AbstractMemberMailNotifierObserver
,AbstractRemoveMemberMailNotifierObserver
,AbstractSolrContentAsyncObserver
,AbstractSolrContentAsyncObserver
,AbstractSolrIndexResourceObserver
,AddMemberMailNotifierObserver
,ContentAttachmentsSolrObserver
,IndexArchivedContentObserver
,IndexContentObserver
,IndexSynchronizedContentObserver
,PageAttachmentsSolrObserver
,ReloadSolrCacheForAclUpdatedObserver
,RemoveMemberMailManagersNotifierObserver
,RemoveMemberMailNotifierObserver
,SolrContentModifiedObserver
,SolrContentModifiedObserver
,SolrContentValidatedObserver
,SolrContentValidatedPart2Observer
,SolrIndexProjectResourceObserver
,SolrIndexResourceObserver
,SolrIndexWebResourceObserver
,SolrLiveContentValidatedOrTaggedObserver
public interface AsyncObserver extends Observer
An interface to mark an observer as asynchronous. TheObserver.observe(Event, java.util.Map)
method will be run in another thread and then will not block the main process.
Priority between AsyncObserver is still respected. For a givenEvent
, a higher priority AsyncObserver will not run until lower ones are finished.
-
-
Field Summary
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
parallelizable()
Indicates if the observer can be run in parallel with others.-
Methods inherited from interface org.ametys.core.observation.Observer
getPriority, observe, supports
-
-
-
-
Method Detail
-
parallelizable
default boolean parallelizable()
Indicates if the observer can be run in parallel with others. If not, the observer will be run in a single worker thread that will consume the queue of non-parallelizable observers. However parallelizable observers could be run in parallel with other observers. In this case could not rely on priority anymore.- Returns:
- true if parallelizable
-
-