net.sf.sparql.benchmarking.operations.update
Class FixedUpdateOperation

java.lang.Object
  extended by net.sf.sparql.benchmarking.operations.AbstractOperation
      extended by net.sf.sparql.benchmarking.operations.update.FixedUpdateOperation
All Implemented Interfaces:
Operation, UpdateOperation
Direct Known Subclasses:
FixedNvpUpdateOperation

public class FixedUpdateOperation
extends AbstractOperation
implements UpdateOperation

An operation that makes a fixed SPARQL Update against a remote SPARQL service via HTTP

Author:
rvesse

Constructor Summary
FixedUpdateOperation(String name, String updateString)
          Creates a new update 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.
 UpdateRequest getUpdate()
          Gets the actual update
 String getUpdateString()
          Gets the update string used to create this update
 
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
 
Methods inherited from interface net.sf.sparql.benchmarking.operations.Operation
getId, getName, getStats, setId
 

Constructor Detail

FixedUpdateOperation

public FixedUpdateOperation(String name,
                            String updateString)
Creates a new update operation

Parameters:
name - Name
updateString - SPARQL Update
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

Specified by:
canRun in interface Operation
Parameters:
runner - Runner
options - Options
Returns:
True if the operation can run, false otherwise

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

Specified by:
createCallable in interface Operation
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

Specified by:
createErrorInformation in interface Operation
Parameters:
message - Error message
category - Error category
runtime - Runtime
Returns:
Error information

getType

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

Specified by:
getType in interface Operation
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.

Specified by:
getContentString in interface Operation
Returns:
Content string

getUpdate

public UpdateRequest getUpdate()
Description copied from interface: UpdateOperation
Gets the actual update

Specified by:
getUpdate in interface UpdateOperation
Returns:
Update

getUpdateString

public String getUpdateString()
Description copied from interface: UpdateOperation
Gets the update string used to create this update

Specified by:
getUpdateString in interface UpdateOperation
Returns:
Raw update string


Copyright © 2014. All Rights Reserved.