net.sf.sparql.benchmarking.runners.operations
Class RetryingOperationRunner

java.lang.Object
  extended by net.sf.sparql.benchmarking.runners.operations.DefaultOperationRunner
      extended by net.sf.sparql.benchmarking.runners.operations.RetryingOperationRunner
All Implemented Interfaces:
OperationRunner

public class RetryingOperationRunner
extends DefaultOperationRunner

An operation runner that will retry the given operation if it produces an error

Author:
rvesse

Constructor Summary
RetryingOperationRunner(int maxRetries)
          Creates a new runner
 
Method Summary
<T extends Options>
OperationRun
run(Runner<T> runner, T options, Operation op)
          Runs the operation returning the statistics as an OperationRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetryingOperationRunner

public RetryingOperationRunner(int maxRetries)
Creates a new runner

Parameters:
maxRetries - Maximum number of retries, a value of 0 means no retries in which case behaviour is equivalent to the base class DefaultOperationRunner
Method Detail

run

public <T extends Options> OperationRun run(Runner<T> runner,
                                            T options,
                                            Operation op)
Description copied from interface: OperationRunner
Runs the operation returning the statistics as an OperationRun

Implementations are also expected to record the information within their the OperationStats object of the provided Operation instance prior to returning the statistics.

Specified by:
run in interface OperationRunner
Overrides:
run in class DefaultOperationRunner
Parameters:
runner - Runner
options - Options
op - Operation to run
Returns:
Operation Run statistics


Copyright © 2014. All Rights Reserved.