Class HBDataCacheQueue<T>
- java.lang.Object
-
- org.alfresco.heartbeat.datasender.internal.HBDataCacheQueue<T>
-
- Type Parameters:
T-
public class HBDataCacheQueue<T> extends Object
Heartbeat cache implementation - data is consumed in batches and after that evicted from the cache.- Author:
- Ancuta Morarasu
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHBDataCacheQueue.HBCacheEvictOperationFunctional consumer that removes a batch of entries from the cache
-
Constructor Summary
Constructors Constructor Description HBDataCacheQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(T data)voidaddAll(List<T> data)voidclear()voidloadCache()voidpersistCache()voidprocess(int batchSize, Consumer<List<T>> consumer)Data is consumed in batches; if the processing is successful, the batch is removed from the cache.voidremoveAll(List<T> data)voidsetMaxEntries(long maxEntries)intsize()
-
-
-
Method Detail
-
add
public void add(T data)
-
clear
public void clear()
-
persistCache
public void persistCache()
-
loadCache
public void loadCache()
-
size
public int size()
-
setMaxEntries
public void setMaxEntries(long maxEntries)
-
-