Class AbstractSystemAdapter

    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • terminateMutex

        private Semaphore terminateMutex
        Mutex used to wait for the terminate signal.
      • cause

        private Exception cause
        The cause for an unusual termination.
      • causeMutex

        private Semaphore causeMutex
        Mutex used to manage access to the cause object.
      • maxParallelProcessedMsgs

        private final int maxParallelProcessedMsgs
        The maximum number of incoming messages of a single queue that are processed in parallel. Additional messages have to wait.
      • dataGenReceiver

        protected DataReceiver dataGenReceiver
        Receiver for data coming from the data generator.
      • taskGenReceiver

        protected DataReceiver taskGenReceiver
        Receiver for tasks coming from the task generator.
      • sender2EvalStore

        protected DataSender sender2EvalStore
        Sender for sending messages from the benchmarked system to the evaluation storage.
      • systemParamModel

        protected org.apache.jena.rdf.model.Model systemParamModel
        The RDF model containing the system parameters.
    • Constructor Detail

      • AbstractSystemAdapter

        public AbstractSystemAdapter​(int maxParallelProcessedMsgs)
        Constructor setting the maximum number of messages processed in parallel.
        Parameters:
        maxParallelProcessedMsgs - The maximum number of incoming messages of a single queue that are processed in parallel. Additional messages have to wait.
    • Method Detail

      • run

        public void run()
                 throws Exception
        Description copied from interface: Component
        This method executes the component.
        Specified by:
        run in interface Component
        Throws:
        Exception - if an error occurs during the execution
      • sendResultToEvalStorage

        protected void sendResultToEvalStorage​(String taskIdString,
                                               byte[] data)
                                        throws IOException
        This method sends the given result data for the task with the given task id to the evaluation storage.
        Parameters:
        taskIdString - the id of the task
        data - the data of the task
        Throws:
        IOException - if there is an error during the sending
      • terminate

        protected void terminate​(Exception cause)
        Starts termination of the main thread of this system adapter. If a cause is given, it will be thrown causing an abortion from the main thread instead of a normal termination.
        Parameters:
        cause - the cause for an abortion of the process or {code null} if the component should terminate in a normal way.