Interface AsyncObserver

All Superinterfaces:
Observer
All Known Implementing Classes:
AbstractMemberMailNotifierObserver, AbstractMemberObserver, AbstractNotifyMentionsObserver, AbstractSolrContentAsyncObserver, AbstractSolrContentAsyncObserver, AbstractSolrIndexResourceObserver, ContentAttachmentsSolrObserver, ContentValidatedObserver, EducationalPathRemovedObserver, FileThumbnailObserver, IndexArchivedContentObserver, IndexContentObserver, IndexMemberObserver, IndexSharedPropertyOnHierarchyChangedObserver, IndexSynchronizedContentObserver, InvalidateCacheOnMemberUpdatedObserver, InvalidateUserCacheObserver, InvalidateZoneItemCacheOnMemberUpdatedObserver, JdbcUserDirectory, MaintenanceObserver, NotifyActivityAsyncObserver, NotifyContentMentionsObserver, NotifyContentMentionsObserver, PageAttachmentsSolrObserver, ProjectActivityObserver, ProjectAddedObserver, ProjectDeletedObserver, ProjectDeletedObserver, ProjectMemberManager, ReloadSolrCacheForAclUpdatedObserver, RemoveEducationalPathOnContentDeletionObserver, RemoveMemberMailManagersNotifierObserver, RemoveMemberMailNotifierObserver, SendTagNotificationOnCreatedActivityObserver, SolrContentModifiedObserver, SolrContentModifiedObserver, SolrContentValidatedObserver, SolrContentValidatedPart2Observer, SolrIndexProjectResourceObserver, SolrIndexResourceObserver, SolrIndexWebResourceObserver, SolrLiveContentValidatedOrTaggedObserver, SolrOdfContentModifiedObserver, SolrPageContentModifiedObserver, WelcomeMemberMailNotifierObserver

public interface AsyncObserver extends Observer
An interface to mark an observer as asynchronous. The Observer.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 given Event, a higher priority AsyncObserver will not run until lower ones are finished.
  • Method Details

    • 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