Class AttestationQueueProcessor

  • All Implemented Interfaces:
    java.lang.Runnable

    public class AttestationQueueProcessor
    extends java.lang.Object
    implements java.lang.Runnable
    Process entry in the table suseAttestationResult and executes the proper based on the result type.
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • dataAvailable

        private final java.lang.Object dataAvailable
      • listenerRunning

        private final java.util.concurrent.atomic.AtomicBoolean listenerRunning
      • sessionFactory

        private final org.apache.ibatis.session.SqlSessionFactory sessionFactory
      • executorService

        private final java.util.concurrent.ExecutorService executorService
      • batchSize

        private final int batchSize
    • Constructor Detail

      • AttestationQueueProcessor

        public AttestationQueueProcessor​(org.apache.ibatis.session.SqlSessionFactory sessionFactoryIn,
                                         Configuration configurationIn,
                                         AttestationModuleLoader moduleLoaderIn)
        Create an attestation queue processor.
        Parameters:
        sessionFactoryIn - the session factory to access the database
        configurationIn - the current application configuration
        moduleLoaderIn - the attestation module loader
      • AttestationQueueProcessor

        protected AttestationQueueProcessor​(org.apache.ibatis.session.SqlSessionFactory sessionFactoryIn,
                                            AttestationResultService serviceIn,
                                            java.util.concurrent.ExecutorService executorServiceIn,
                                            AttestationModuleLoader moduleLoaderIn,
                                            int batchSizeIn)
        Create an attestation queue processor.
        Parameters:
        sessionFactoryIn - the session factory
        serviceIn - the attestation result service
        executorServiceIn - the executor to perform the process
        moduleLoaderIn - the attestation module loader
        batchSizeIn - the batch size
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • createListenerThread

        private java.lang.Thread createListenerThread()
      • stopListenerThread

        private static void stopListenerThread​(java.lang.Thread listenerThread)
      • shutdownExecutor

        private void shutdownExecutor()
      • listenForAttestationResults

        private void listenForAttestationResults()