Class DefaultAfterSaveListenerRegistry

  • All Implemented Interfaces:
    AfterSaveListenerRegistry, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    public class DefaultAfterSaveListenerRegistry
    extends java.lang.Object
    implements AfterSaveListenerRegistry, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    Default implementation for AfterSaveListenerRegistry
    Since:
    5.0
    • Field Detail

      • CORE_AFTERSAVE_INTERVAL

        public static final java.lang.String CORE_AFTERSAVE_INTERVAL
        See Also:
        Constant Field Values
      • CORE_AFTERSAVE_BATCHSIZE

        public static final java.lang.String CORE_AFTERSAVE_BATCHSIZE
        See Also:
        Constant Field Values
      • CORE_AFTERSAVE_QUEUESIZE

        public static final java.lang.String CORE_AFTERSAVE_QUEUESIZE
        See Also:
        Constant Field Values
      • CORE_AFTERSAVE_ASYNC

        public static final java.lang.String CORE_AFTERSAVE_ASYNC
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultAfterSaveListenerRegistry

        public DefaultAfterSaveListenerRegistry()
    • Method Detail

      • setListeners

        public void setListeners​(java.util.List<AfterSaveListener> listeners)
      • enqueueChangesForAsyncNotification

        protected void enqueueChangesForAsyncNotification​(byte[][] changes)
      • notifyListenersSynchronously

        protected void notifyListenersSynchronously​(java.util.Collection<AfterSaveEvent> events)
      • removeListener

        public void removeListener​(AfterSaveListener afterSaveListener)
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • initPublisherThread

        protected void initPublisherThread()
      • getBatchSizeParam

        protected int getBatchSizeParam()
      • getSleepTimeParam

        protected long getSleepTimeParam()
      • getQueueSizeParam

        protected int getQueueSizeParam()
      • isAsyncParam

        protected boolean isAsyncParam()
      • doNotifyListeners

        protected void doNotifyListeners​(java.util.Collection<AfterSaveEvent> events,
                                         java.util.Collection<AfterSaveListener> listeners)
        Notifies all registered listeners with the AfterSaveEvents.
      • isPublishAsynchronously

        protected boolean isPublishAsynchronously()