Class MultipleCLIInputWorker

  • All Implemented Interfaces:
    java.lang.Runnable, Worker
    Direct Known Subclasses:
    CLIInputFileWorker, CLIInputPrefixWorker

    @Shorthand("MultipleCLIInputWorker")
    public class MultipleCLIInputWorker
    extends AbstractRandomQueryChooserWorker
    Worker to execute a query against a CLI process, the connection.service will be the command to execute the query against. Assumes that the CLI process won't stop but will just accepts queries one after another and returns the results in the CLI output. This worker can be set to be created multiple times in the background if one process will throw an error, a backup process was already created and can be used. This is handy if the process won't just prints an error message, but simply exits.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultipleCLIInputWorker​(java.lang.String taskID, Connection connection, java.lang.String queriesFile, java.lang.String initFinished, java.lang.String queryFinished, java.lang.String queryError, java.lang.Integer numberOfProcesses, java.lang.Integer timeOut, java.lang.Integer timeLimit, java.lang.Integer fixedLatency, java.lang.Integer gaussianLatency, java.lang.Integer workerID)  
      MultipleCLIInputWorker​(java.lang.String taskID, Connection connection, java.lang.String queriesFile, java.lang.String initFinished, java.lang.String queryFinished, java.lang.String queryError, java.lang.Integer numberOfProcesses, java.lang.Integer timeOut, java.lang.Integer timeLimit, java.lang.Integer fixedLatency, java.lang.Integer gaussianLatency, java.lang.String workerType, java.lang.Integer workerID)  
    • Constructor Detail

      • MultipleCLIInputWorker

        public MultipleCLIInputWorker​(java.lang.String taskID,
                                      Connection connection,
                                      java.lang.String queriesFile,
                                      java.lang.String initFinished,
                                      java.lang.String queryFinished,
                                      java.lang.String queryError,
                                      @Nullable
                                      java.lang.Integer numberOfProcesses,
                                      @Nullable
                                      java.lang.Integer timeOut,
                                      @Nullable
                                      java.lang.Integer timeLimit,
                                      @Nullable
                                      java.lang.Integer fixedLatency,
                                      @Nullable
                                      java.lang.Integer gaussianLatency,
                                      java.lang.Integer workerID)
      • MultipleCLIInputWorker

        public MultipleCLIInputWorker​(java.lang.String taskID,
                                      Connection connection,
                                      java.lang.String queriesFile,
                                      java.lang.String initFinished,
                                      java.lang.String queryFinished,
                                      java.lang.String queryError,
                                      @Nullable
                                      java.lang.Integer numberOfProcesses,
                                      @Nullable
                                      java.lang.Integer timeOut,
                                      @Nullable
                                      java.lang.Integer timeLimit,
                                      @Nullable
                                      java.lang.Integer fixedLatency,
                                      @Nullable
                                      java.lang.Integer gaussianLatency,
                                      java.lang.String workerType,
                                      java.lang.Integer workerID)
    • Method Detail

      • executeQuery

        public void executeQuery​(java.lang.String query,
                                 java.lang.String queryID)
        Description copied from interface: Worker
        This method executes a query and adds the results to the Result Processor for proper result and metric calculations. Note: Some of the Worker implementations employ background threads to process the result of the query. Due to this, this method does not return anything and each implementation of this method must also add the results to Result Processor within this method. This can be done by calling AbstractWorker.addResults(QueryExecutionStats)
        Parameters:
        query - The query which should be executed
        queryID - the ID of the query which should be executed
      • stopSending

        public void stopSending()
        Description copied from interface: Worker
        This should stop the next sending process. If an execution started before this method was called, but answered after, it should not be counted!
        Specified by:
        stopSending in interface Worker
        Overrides:
        stopSending in class AbstractWorker