Package com.suse.coco.attestation
Class ProcessingThread
java.lang.Object
com.suse.coco.attestation.AbstractProcessorThread
com.suse.coco.attestation.ProcessingThread
- All Implemented Interfaces:
Runnable
Main processing thread of the
AttestationQueueProcessor. Extracts the attestation result of the supported
types and uses the correct AttestationModule to process them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Objectprivate final ExecutorServiceprivate ListeningThreadprivate static final org.apache.logging.log4j.Loggerprivate final AttestationModuleLoaderprivate final AttestationResultService -
Constructor Summary
ConstructorsConstructorDescriptionProcessingThread(AttestationResultService serviceIn, ExecutorService executorServiceIn, AttestationModuleLoader moduleLoaderIn, int batchSizeIn) -
Method Summary
Modifier and TypeMethodDescriptionvoidNotifies the processor that some data is ready to be processed.voidrun()voidsetListeningThread(ListeningThread listeningThreadIn) voidstart()Starts the processing of the thread.Methods inherited from class com.suse.coco.attestation.AbstractProcessorThread
await, isRunning, setRunning, stop
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
dataAvailableLock
-
moduleLoader
-
service
-
executorService
-
batchSize
private final int batchSize -
listeningThread
-
-
Constructor Details
-
ProcessingThread
ProcessingThread(AttestationResultService serviceIn, ExecutorService executorServiceIn, AttestationModuleLoader moduleLoaderIn, int batchSizeIn)
-
-
Method Details
-
setListeningThread
-
notifyDataAvailable
public void notifyDataAvailable()Notifies the processor that some data is ready to be processed. Used by theListeningThreadto trigger the processing after receiving a notification. -
start
public void start()Description copied from class:AbstractProcessorThreadStarts the processing of the thread.- Overrides:
startin classAbstractProcessorThread
-
run
public void run()
-