Class ImpressionAggregatorServiceTest.ImpressionAggregatorService
java.lang.Object
com.hybris.ymkt.recommendation.services.ImpressionAggregatorServiceTest.ImpressionAggregatorService
- Enclosing class:
- ImpressionAggregatorServiceTest
To be used to aggregate impressions from UI before persisting to DB.
Expected to be consumed in multi-threaded environment.
Expected to be consumed in multi-threaded environment.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImpression(String scenarioId, int itemCount) voidaddImpression(String scenarioId, int impressionCount, int itemCount, long time) protected longkey(long time) remove()protected List<ImpressionAggregatorServiceTest.Impression>removeInternal(long time)
-
Field Details
-
window
protected int window -
window_2
protected int window_2 -
counters
-
-
Constructor Details
-
ImpressionAggregatorService
public ImpressionAggregatorService()
-
-
Method Details
-
addImpression
-
addImpression
-
key
protected long key(long time) -
remove
- Returns:
- All aggregated
ImpressionAggregatorServiceTest.Impressionexcluding those in the current ongoing aggregationWindow.
-
removeInternal
-