Class UPDATEWorker

  • All Implemented Interfaces:
    java.lang.Runnable, Worker

    @Shorthand("UPDATEWorker")
    public class UPDATEWorker
    extends HttpPostWorker
    A Worker using SPARQL Updates to create service request.
    Author:
    f.conrads
    • Constructor Detail

      • UPDATEWorker

        public UPDATEWorker​(java.lang.String taskID,
                            Connection connection,
                            java.lang.String queriesFile,
                            @Nullable
                            java.lang.String timerStrategy,
                            @Nullable
                            java.lang.Integer timeOut,
                            @Nullable
                            java.lang.Integer timeLimit,
                            @Nullable
                            java.lang.Integer fixedLatency,
                            @Nullable
                            java.lang.Integer gaussianLatency,
                            java.lang.Integer workerID)
    • Method Detail

      • startWorker

        public void startWorker()
        Description copied from class: AbstractWorker
        This will start the worker. It will get the next query, wait as long as it should wait before executing the next query, then it will test the query and send it if not aborted yet to the ResultProcessor Module
        Overrides:
        startWorker in class AbstractWorker
      • waitTimeMs

        public void waitTimeMs()
        Description copied from interface: Worker
        This will simulate the Time in ms to wait before testing the next query. It can be used to simulate network delay.
        Specified by:
        waitTimeMs in interface Worker
        Overrides:
        waitTimeMs in class AbstractWorker
      • getNextQuery

        public void getNextQuery​(java.lang.StringBuilder queryStr,
                                 java.lang.StringBuilder queryID)
                          throws java.io.IOException
        Description copied from interface: Worker
        This method saves the next query in the queryStr StringBuilder and the query id in the queryID.
        Specified by:
        getNextQuery in interface Worker
        Overrides:
        getNextQuery in class AbstractRandomQueryChooserWorker
        Parameters:
        queryStr - The query should be stored in here!
        queryID - The queryID should be stored in here!
        Throws:
        java.io.IOException
      • hasExecutedNoOfQueryMixes

        public boolean hasExecutedNoOfQueryMixes​(double noOfQueryMixes)
        Checks if one queryMix was already executed, as it does not matter how many mixes should be executed
        Specified by:
        hasExecutedNoOfQueryMixes in interface Worker
        Overrides:
        hasExecutedNoOfQueryMixes in class AbstractWorker
        Parameters:
        noOfQueryMixes -
        Returns: