Package de.hybris.platform.tx
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(AfterSaveListener afterSaveListener) voidvoiddestroy()protected voiddoNotifyListeners(Collection<AfterSaveEvent> events, Collection<AfterSaveListener> listeners) Notifies all registered listeners with the AfterSaveEvents.protected voidenqueueChangesForAsyncNotification(byte[][] changes) protected longprotected intprotected intprotected longprotected voidprotected booleanprotected booleanprotected voidvoidpublishChanges(byte[][] encodedChanges) Publishes a set of encoded changes.voidremoveListener(AfterSaveListener afterSaveListener) voidsetListeners(List<AfterSaveListener> listeners)
-
Field Details
-
CORE_AFTERSAVE_INTERVAL
- See Also:
-
CORE_AFTERSAVE_BATCHSIZE
- See Also:
-
CORE_AFTERSAVE_QUEUESIZE
- See Also:
-
CORE_AFTERSAVE_ACTIVE_TIME
- See Also:
-
CORE_AFTERSAVE_ASYNC
- See Also:
-
-
Constructor Details
-
DefaultAfterSaveListenerRegistry
public DefaultAfterSaveListenerRegistry()
-
-
Method Details
-
setListeners
-
publishChanges
public void publishChanges(byte[][] encodedChanges) Description copied from interface:AfterSaveListenerRegistryPublishes a set of encoded changes.- Specified by:
publishChangesin interfaceAfterSaveListenerRegistry- Parameters:
encodedChanges- an array which consists of byte arrays with a fixed length of 9- See Also:
-
enqueueChangesForAsyncNotification
protected void enqueueChangesForAsyncNotification(byte[][] changes) -
notifyListenersSynchronously
-
addListener
-
removeListener
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.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()
-