net.sf.sparql.benchmarking.operations
Interface Operation

All Known Subinterfaces:
QueryOperation, UpdateOperation
All Known Implementing Classes:
AbstractGSPOperation, AbstractInMemoryQueryOperation, AbstractOperation, AbstractParameterizedQueryOperation, AbstractParameterizedSparqlOperation, AbstractParameterizedUpdateOperation, AbstractQueryOperation, AbstractRemoteQueryOperation, DatasetSizeOperation, FixedNvpQueryOperation, FixedNvpUpdateOperation, FixedQueryOperation, FixedUpdateOperation, GSPDeleteOperation, GSPGetOperation, GSPHeadOperation, GSPPostOperation, GSPPutOperation, InMemoryFixedQueryOperation, InMemoryFixedUpdateOperation, InMemoryParameterizedQueryOperation, InMemoryParameterizedUpdateOperation, MixOperation, ParameterizedNvpQueryOperation, ParameterizedNvpUpdateOperation, ParameterizedQueryOperation, ParameterizedUpdateOperation, SleepOperation

public interface Operation

Represents a single operation within a testing run

Author:
rvesse

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.
 int getId()
          Gets the ID used to identify the operation within an operation mix (if known)
 String getName()
          Gets the name of the operation
 OperationStats getStats()
          Gets statistics for the operation
 String getType()
          Gets a descriptive type string for the operation e.g.
 void setId(int id)
          Sets the ID used to identify the operation within an operation mix
 

Method Detail

getName

String getName()
Gets the name of the operation

In the 1.x releases this was almost always the filename but in the 2.x code base this is often a friendly user defined name

Returns:
Name

canRun

<T extends Options> boolean canRun(Runner<T> runner,
                                   T options)
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

createCallable

<T extends Options> OperationCallable<T> createCallable(Runner<T> runner,
                                                        T options)
Creates the callable for running the operation in a background thread

Parameters:
runner - Runner
options - Options
Returns:
Callable

createErrorInformation

OperationRun createErrorInformation(String message,
                                    int category,
                                    long runtime)
Creates run information for an error

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

getType

String getType()
Gets a descriptive type string for the operation e.g. SPARQL Query

Returns:
Type string

getContentString

String getContentString()
Gets a string that shows the content of the operation e.g. SPARQL Query string, SPARQL Update string etc.

Returns:
Content string

getStats

OperationStats getStats()
Gets statistics for the operation

Returns:
Operation statistics

getId

int getId()
Gets the ID used to identify the operation within an operation mix (if known)

Returns:
ID or -1 if no ID unknown

setId

void setId(int id)
Sets the ID used to identify the operation within an operation mix

Parameters:
id - ID


Copyright © 2014. All Rights Reserved.