net.sf.sparql.benchmarking.operations
Class OperationMixImpl

java.lang.Object
  extended by net.sf.sparql.benchmarking.operations.OperationMixImpl
All Implemented Interfaces:
OperationMix

public class OperationMixImpl
extends Object
implements OperationMix

A basic implementation of an operation mix

Author:
rvesse

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
OperationMixImpl(Collection<Operation> ops)
          Creates a new operation mix
 
Method Summary
 Operation getOperation(int id)
          Gets the operation with the specified ID
 Iterator<Operation> getOperations()
          Gets the operations in this mix
 OperationMixStats getStats()
          Gets the statistics for the operation mix
 int size()
          Gets the number of operations in the operation mix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

OperationMixImpl

public OperationMixImpl(Collection<Operation> ops)
Creates a new operation mix

Parameters:
ops - Operations
Method Detail

getOperations

public Iterator<Operation> getOperations()
Description copied from interface: OperationMix
Gets the operations in this mix

Specified by:
getOperations in interface OperationMix
Returns:
Operations

getStats

public OperationMixStats getStats()
Description copied from interface: OperationMix
Gets the statistics for the operation mix

Specified by:
getStats in interface OperationMix
Returns:
Statistics

getOperation

public Operation getOperation(int id)
Description copied from interface: OperationMix
Gets the operation with the specified ID

Generally it should be assumed that operation IDs are allocated using a zero based index so 0 would obtain the first operation in the mix while size()-1 would obtain the last operation in the mix. All the built-in implementations of this interface follow this rule.

Specified by:
getOperation in interface OperationMix
Parameters:
id - ID
Returns:
Operation

size

public int size()
Description copied from interface: OperationMix
Gets the number of operations in the operation mix

Specified by:
size in interface OperationMix
Returns:
Number of operations


Copyright © 2014. All Rights Reserved.