Package de.hybris.platform.outboundsync
Class BatchReleaseStrategy
java.lang.Object
de.hybris.platform.servicelayer.event.impl.AbstractEventListener<StartedOutboundSyncEvent>
de.hybris.platform.outboundsync.BatchReleaseStrategy
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<StartedOutboundSyncEvent>
Defines a release strategy to be used when aggregating
OutboundItemDTOGroups.
It is responsible for determining if the aggregation is complete.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBatchReleaseStrategy(@NotNull OutboundSyncConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMessagesBeReleased(Collection<OutboundItemDTOGroup> itemDTOGroups) Determines if a list of itemDTOGroups can be released from aggregation.protected voidonEvent(StartedOutboundSyncEvent startedOutboundSyncEvent) This method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.Methods inherited from class de.hybris.platform.servicelayer.event.impl.AbstractEventListener
afterPropertiesSet, onApplicationEvent, setApplicationContext, setClusterService, setTenantService
-
Constructor Details
-
BatchReleaseStrategy
-
-
Method Details
-
canMessagesBeReleased
@ReleaseStrategy public boolean canMessagesBeReleased(Collection<OutboundItemDTOGroup> itemDTOGroups) Determines if a list of itemDTOGroups can be released from aggregation.- Parameters:
itemDTOGroups- list of item groups to be aggregated- Returns:
trueif the aggregation can be released,falseif not
-
onEvent
Description copied from class:AbstractEventListenerThis method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.- Specified by:
onEventin classAbstractEventListener<StartedOutboundSyncEvent>- Parameters:
startedOutboundSyncEvent- the event to be processed- See Also:
-
ApplicationListener.onApplicationEvent(ApplicationEvent)
-