net.sf.sparql.benchmarking.runners.mix
Class AbstractOperationMixRunner

java.lang.Object
  extended by net.sf.sparql.benchmarking.runners.mix.AbstractOperationMixRunner
All Implemented Interfaces:
OperationMixRunner
Direct Known Subclasses:
DefaultOperationMixRunner, InOrderOperationMixRunner, SamplingOperationMixRunner

public abstract class AbstractOperationMixRunner
extends Object
implements OperationMixRunner

Abstract implementation of an operation mix runner

Author:
rvesse

Constructor Summary
AbstractOperationMixRunner()
           
 
Method Summary
protected abstract
<T extends Options>
List<Integer>
getOperationOrder(T options, OperationMix mix)
          Gets the order in which the runner should run the operations
protected
<T extends Options>
boolean
reportOperationOrder(T options)
          Whether the runner should report the order of operations as a progress message
<T extends Options>
OperationMixRun
run(Runner<T> runner, T options, OperationMix mix)
          Performs a operation mix run returning the statistics as a OperationMixRun
protected
<T extends Options>
OperationRun
runOp(Runner<T> runner, T options, Operation op)
          Runs an operation based on the configured OperationRunner using the DefaultOperationRunner if none is configured
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOperationMixRunner

public AbstractOperationMixRunner()
Method Detail

runOp

protected <T extends Options> OperationRun runOp(Runner<T> runner,
                                                 T options,
                                                 Operation op)
Runs an operation based on the configured OperationRunner using the DefaultOperationRunner if none is configured

Parameters:
options - Options
op - Operation to run
Returns:
Operation run information

getOperationOrder

protected abstract <T extends Options> List<Integer> getOperationOrder(T options,
                                                                       OperationMix mix)
Gets the order in which the runner should run the operations

Parameters:
options - Options
mix - Mix containing the operations to be run
Returns:
Operation order expressed as a list of IDs

reportOperationOrder

protected <T extends Options> boolean reportOperationOrder(T options)
Whether the runner should report the order of operations as a progress message

The default implementation returns true so operation order is always reported

Returns:
True if operation order should be default

run

public <T extends Options> OperationMixRun run(Runner<T> runner,
                                               T options,
                                               OperationMix mix)
Description copied from interface: OperationMixRunner
Performs a operation mix run returning the statistics as a OperationMixRun

Implementations are also expected to record the information within the OperationMixStats object of the given OperationMix instance prior to returning the statistics.

Specified by:
run in interface OperationMixRunner
Parameters:
runner - Runner
options - Options
mix - Operation mix to be run
Returns:
Operation Mix run details


Copyright © 2014. All Rights Reserved.