Autopsy  4.20.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T > Class Template Reference

Public Member Functions

 BatchProcessor (int batchSize, long secondsTimeout, Consumer< List< T >> itemsConsumer)
 
synchronized void add (T item) throws InterruptedException
 
synchronized void flushAndReset () throws InterruptedException
 

Private Member Functions

synchronized void asyncProcessBatch () throws InterruptedException
 

Private Attributes

final BlockingQueue< T > batchingQueue
 
final int batchSize
 
final Consumer< List< T > > itemsConsumer
 
ExecutorService processingExecutorService = Executors.newSingleThreadExecutor()
 
final long secondsTimeout
 

Detailed Description

Processes a batch when number of items reaches batchSize or flush. Processing blocks (and subsequently add and flush operations) until previous batch finishes.

Definition at line 39 of file BatchProcessor.java.

Constructor & Destructor Documentation

com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.BatchProcessor ( int  batchSize,
long  secondsTimeout,
Consumer< List< T >>  itemsConsumer 
)

Definition at line 48 of file BatchProcessor.java.

Member Function Documentation

synchronized void com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.add ( item) throws InterruptedException

Definition at line 55 of file BatchProcessor.java.

synchronized void com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.asyncProcessBatch ( ) throws InterruptedException
private
synchronized void com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.flushAndReset ( ) throws InterruptedException

Definition at line 62 of file BatchProcessor.java.

Member Data Documentation

final BlockingQueue<T> com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.batchingQueue
private

Definition at line 43 of file BatchProcessor.java.

final Consumer<List<T> > com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.itemsConsumer
private
ExecutorService com.basistech.df.cybertriage.autopsy.malwarescan.BatchProcessor< T >.processingExecutorService = Executors.newSingleThreadExecutor()
private

Definition at line 41 of file BatchProcessor.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Tue Aug 1 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.