Class CacheBulkProcessor
java.lang.Object
org.codice.ddf.catalog.solr.cache.impl.CacheBulkProcessor
Bulk adds metacards to the cache that are not needed immediately.
-
Constructor Summary
ConstructorsConstructorDescriptionCacheBulkProcessor(SolrCache cache) CacheBulkProcessor(SolrCache cache, long delay, TimeUnit delayUnit, CacheStrategy cacheStrategy) Create a new cache bulk processor that will check added metacards for bulk processing at the configured delay interval. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds metacards to be bulk added to cache.voidsetBatchSize(int batchSize) voidsetCacheStrategy(CacheStrategy cacheStrategy) voidsetFlushInterval(long flushInterval) voidsetMaximumBacklogSize(int maximumBacklogSize) voidshutdown()Shutdown scheduled tasks.
-
Constructor Details
-
CacheBulkProcessor
-
CacheBulkProcessor
public CacheBulkProcessor(SolrCache cache, long delay, TimeUnit delayUnit, CacheStrategy cacheStrategy) Create a new cache bulk processor that will check added metacards for bulk processing at the configured delay interval.- Parameters:
cache- target Solr cache to bulk add metacardsdelay- delay between decision to bulk adddelayUnit- units of the delay
-
-
Method Details
-
add
Adds metacards to be bulk added to cache. Metacards will be ignored if backlog grows too large. Metacard currently in backlog will be updated if added again.- Parameters:
results- metacards to add to current batch
-
shutdown
public void shutdown()Shutdown scheduled tasks. -
setFlushInterval
public void setFlushInterval(long flushInterval) -
setBatchSize
public void setBatchSize(int batchSize) -
setMaximumBacklogSize
public void setMaximumBacklogSize(int maximumBacklogSize) -
setCacheStrategy
-