net.sf.sparql.benchmarking.operations.util
Class MixOperation

java.lang.Object
  extended by net.sf.sparql.benchmarking.operations.AbstractOperation
      extended by net.sf.sparql.benchmarking.operations.util.MixOperation
All Implemented Interfaces:
Operation

public class MixOperation
extends AbstractOperation

An operation that runs an entire operation mix

Author:
rvesse

Constructor Summary
MixOperation(String name, OperationMix mix)
          Creates a new mix operation
MixOperation(String name, OperationMix mix, boolean randomOrder)
          Creates a new mix operation
 
Method Summary
<T extends Options>
boolean
canRun(Runner<T> runner, T options)
          Report whether the operation can run based on the available options
<T extends Options>
OperationCallable<T>
createCallable(Runner<T> runner, T options)
          Creates the callable for running the operation in a background thread
 OperationRun createErrorInformation(String message, int category, long runtime)
          Creates run information for an error
 String getContentString()
          Gets a string that shows the content of the operation e.g.
 String getType()
          Gets a descriptive type string for the operation e.g.
 
Methods inherited from class net.sf.sparql.benchmarking.operations.AbstractOperation
getId, getName, getStats, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MixOperation

public MixOperation(String name,
                    OperationMix mix)
Creates a new mix operation

Parameters:
name - Name
mix - Mix

MixOperation

public MixOperation(String name,
                    OperationMix mix,
                    boolean randomOrder)
Creates a new mix operation

Parameters:
name - Name
mix - Mix
randomOrder - Whether to randomize the order of operations
Method Detail

canRun

public <T extends Options> boolean canRun(Runner<T> runner,
                                          T options)
Description copied from interface: Operation
Report whether the operation can run based on the available options

Parameters:
runner - Runner
options - Options
Returns:
True if the operation can run, false otherwise

getType

public String getType()
Description copied from interface: Operation
Gets a descriptive type string for the operation e.g. SPARQL Query

Returns:
Type string

getContentString

public String getContentString()
Description copied from interface: Operation
Gets a string that shows the content of the operation e.g. SPARQL Query string, SPARQL Update string etc.

Returns:
Content string

createCallable

public <T extends Options> OperationCallable<T> createCallable(Runner<T> runner,
                                                               T options)
Description copied from interface: Operation
Creates the callable for running the operation in a background thread

Parameters:
runner - Runner
options - Options
Returns:
Callable

createErrorInformation

public OperationRun createErrorInformation(String message,
                                           int category,
                                           long runtime)
Description copied from interface: Operation
Creates run information for an error

Parameters:
message - Error message
category - Error category
runtime - Runtime
Returns:
Error information


Copyright © 2014. All Rights Reserved.