Package org.aksw.iguana.cc.worker.impl
Class UPDATEWorker
- java.lang.Object
-
- 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 Summary
Constructors Constructor Description UPDATEWorker(java.lang.String taskID, Connection connection, java.lang.String queriesFile, java.lang.String timerStrategy, java.lang.Integer timeOut, java.lang.Integer timeLimit, java.lang.Integer fixedLatency, java.lang.Integer gaussianLatency, java.lang.Integer workerID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResults(QueryExecutionStats results)voidgetNextQuery(java.lang.StringBuilder queryStr, java.lang.StringBuilder queryID)This method saves the next query in the queryStr StringBuilder and the query id in the queryID.booleanhasExecutedNoOfQueryMixes(double noOfQueryMixes)Checks if one queryMix was already executed, as it does not matter how many mixes should be executedvoidsetQueriesList(java.io.File[] updateFiles)Sets the Query Instances repr.voidstartWorker()This will start the worker.voidwaitTimeMs()This will simulate the Time in ms to wait before testing the next query.-
Methods inherited from class org.aksw.iguana.cc.worker.impl.HttpPostWorker
executeQuery
-
Methods inherited from class org.aksw.iguana.cc.worker.impl.HttpWorker
getProcessedResults, shutdownResultProcessor
-
Methods inherited from class org.aksw.iguana.cc.worker.AbstractWorker
getExecutedQueries, getNoOfQueries, getQueriesFileName, isTerminated, popQueryResults, run, stopSending
-
-
-
-
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:AbstractWorkerThis 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:
startWorkerin classAbstractWorker
-
waitTimeMs
public void waitTimeMs()
Description copied from interface:WorkerThis will simulate the Time in ms to wait before testing the next query. It can be used to simulate network delay.- Specified by:
waitTimeMsin interfaceWorker- Overrides:
waitTimeMsin classAbstractWorker
-
addResults
public void addResults(QueryExecutionStats results)
- Overrides:
addResultsin classAbstractWorker
-
getNextQuery
public void getNextQuery(java.lang.StringBuilder queryStr, java.lang.StringBuilder queryID) throws java.io.IOExceptionDescription copied from interface:WorkerThis method saves the next query in the queryStr StringBuilder and the query id in the queryID.- Specified by:
getNextQueryin interfaceWorker- Overrides:
getNextQueryin classAbstractRandomQueryChooserWorker- Parameters:
queryStr- The query should be stored in here!queryID- The queryID should be stored in here!- Throws:
java.io.IOException
-
setQueriesList
public void setQueriesList(java.io.File[] updateFiles)
Description copied from class:AbstractWorkerSets the Query Instances repr. in Files.- Overrides:
setQueriesListin classAbstractRandomQueryChooserWorker- Parameters:
updateFiles- File containing the query instances.
-
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:
hasExecutedNoOfQueryMixesin interfaceWorker- Overrides:
hasExecutedNoOfQueryMixesin classAbstractWorker- Parameters:
noOfQueryMixes-- Returns:
-
-