net.sf.sparql.benchmarking.operations.query.callables
Class LongValueCallable<T extends Options,TCallable extends AbstractQueryCallable<T>>
java.lang.Object
net.sf.sparql.benchmarking.operations.AbstractOperationCallable<T>
net.sf.sparql.benchmarking.operations.query.callables.AbstractQueryCallable<T>
net.sf.sparql.benchmarking.operations.query.callables.WrapperQueryCallable<T,TCallable>
net.sf.sparql.benchmarking.operations.query.callables.AbstractScalarValueCallable<T,TCallable>
net.sf.sparql.benchmarking.operations.query.callables.LongValueCallable<T,TCallable>
- Type Parameters:
T
- Options typeTCallable
- Callable type
- All Implemented Interfaces:
- Callable<OperationRun>, OperationCallable<T>
public class LongValueCallable<T extends Options,TCallable extends AbstractQueryCallable<T>>
- extends AbstractScalarValueCallable<T,TCallable>
A callable for getting the value of a specific variable in the first row of a
result set as a long
Usually used in conjunction with custom operations like
DatasetSizeOperation
which calculate some aggregate on the data using
a SELECT
query and want to return that aggregate value as the number
of results rather than the number of results rows as the basic
RemoteQueryCallable
would return.
- Author:
- rvesse
Method Summary |
protected long |
nodeToLong(Node n)
Method that should be implemented by derived classes to convert the node
into an integer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LongValueCallable
public LongValueCallable(Runner<T> runner,
T options,
TCallable callable,
String var)
- Creates a new callable
- Parameters:
var
- Variable whose value is to be retrievedrunner
- Runneroptions
- Optionscallable
- Callable to decorate
nodeToLong
protected long nodeToLong(Node n)
- Description copied from class:
AbstractScalarValueCallable
- Method that should be implemented by derived classes to convert the node
into an integer
- Specified by:
nodeToLong
in class AbstractScalarValueCallable<T extends Options,TCallable extends AbstractQueryCallable<T>>
- Parameters:
n
- Node
- Returns:
- Long integer
Copyright © 2014. All Rights Reserved.