net.sf.sparql.benchmarking.operations.gsp
Class AbstractGSPCallable<T extends Options>

java.lang.Object
  extended by net.sf.sparql.benchmarking.operations.AbstractOperationCallable<T>
      extended by net.sf.sparql.benchmarking.operations.gsp.AbstractGSPCallable<T>
Type Parameters:
T - Options type
All Implemented Interfaces:
Callable<OperationRun>, OperationCallable<T>
Direct Known Subclasses:
GSPDeleteCallable, GSPGetCallable, GSPHeadCallable, GSPPostCallable, GSPPutCallable

public abstract class AbstractGSPCallable<T extends Options>
extends AbstractOperationCallable<T>

Abstract callable for GSP operations

Author:
rvesse

Constructor Summary
AbstractGSPCallable(Runner<T> runner, T options)
          Creates a new callable
AbstractGSPCallable(Runner<T> runner, T options, String uri)
          Creates a new callable
 
Method Summary
 OperationRun call()
           
protected abstract  long doOperation(DatasetAccessor accessor)
          Does the operation using the accessor and returns the number of results
protected  DatasetAccessor getAccessor()
          Gets a DatasetAccessor prepared with the configured options
protected  String getGraphUri()
          Gets the URI of the graph this callable operates on
protected  boolean isDefaultGraphUri()
          Gets whether the callable is operating on the default grah
 
Methods inherited from class net.sf.sparql.benchmarking.operations.AbstractOperationCallable
cancel, getOptions, getRunner, isCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGSPCallable

public AbstractGSPCallable(Runner<T> runner,
                           T options)
Creates a new callable

Parameters:
runner - Runner
options - Options

AbstractGSPCallable

public AbstractGSPCallable(Runner<T> runner,
                           T options,
                           String uri)
Creates a new callable

Parameters:
runner - Runner
options - Options
uri - Graph URI
Method Detail

call

public OperationRun call()

doOperation

protected abstract long doOperation(DatasetAccessor accessor)
Does the operation using the accessor and returns the number of results

Parameters:
accessor - Accessor
Returns:
Number of results

isDefaultGraphUri

protected boolean isDefaultGraphUri()
Gets whether the callable is operating on the default grah

Returns:
True if operating on the default graph, false otherwise

getGraphUri

protected final String getGraphUri()
Gets the URI of the graph this callable operates on

Returns:
Graph URI

getAccessor

protected DatasetAccessor getAccessor()
Gets a DatasetAccessor prepared with the configured options

Returns:
Dataset Accessor


Copyright © 2014. All Rights Reserved.