Class DefaultAfterSaveListenerRegistry

java.lang.Object
de.hybris.platform.tx.DefaultAfterSaveListenerRegistry
All Implemented Interfaces:
AfterSaveListenerRegistry, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

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

  • Constructor Details

    • DefaultAfterSaveListenerRegistry

      public DefaultAfterSaveListenerRegistry()
  • Method Details

    • setListeners

      public void setListeners(List<AfterSaveListener> listeners)
    • publishChanges

      public void publishChanges(byte[][] encodedChanges)
      Description copied from interface: AfterSaveListenerRegistry
      Publishes a set of encoded changes.
      Specified by:
      publishChanges in interface AfterSaveListenerRegistry
      Parameters:
      encodedChanges - an array which consists of byte arrays with a fixed length of 9
      See Also:
    • enqueueChangesForAsyncNotification

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

      protected void notifyListenersSynchronously(Collection<AfterSaveEvent> events)
    • addListener

      public void addListener(AfterSaveListener afterSaveListener)
    • removeListener

      public void removeListener(AfterSaveListener afterSaveListener)
    • destroy

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

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

      protected void initPublisherThread()
    • getBatchSizeParam

      protected int getBatchSizeParam()
    • getSleepTimeParam

      protected long getSleepTimeParam()
    • getQueueSizeParam

      protected int getQueueSizeParam()
    • isAsyncParam

      protected boolean isAsyncParam()
    • getActiveTimeParam

      protected long getActiveTimeParam()
    • doNotifyListeners

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

      protected boolean isPublishAsynchronously()