Class HBDataCacheQueue<T>
java.lang.Object
org.alfresco.heartbeat.datasender.internal.HBDataCacheQueue<T>
Heartbeat cache implementation - data is consumed in batches and after that evicted from the cache.
- Author:
- Ancuta Morarasu
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassFunctional consumer that removes a batch of entries from the cache -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidclear()voidvoidvoidData is consumed in batches; if the processing is successful, the batch is removed from the cache.voidvoidsetMaxEntries(long maxEntries) intsize()
-
Field Details
-
cache
-
-
Constructor Details
-
HBDataCacheQueue
public HBDataCacheQueue()
-
-
Method Details
-
add
-
addAll
-
removeAll
-
clear
public void clear() -
persistCache
public void persistCache() -
loadCache
public void loadCache() -
size
public int size() -
setMaxEntries
public void setMaxEntries(long maxEntries) -
process
Data is consumed in batches; if the processing is successful, the batch is removed from the cache.- Parameters:
batchSize- the size of the batch to processconsumer- the batch processor
-