com.sun.faban.driver.util
Interface PairwiseAggregator.Provider<T extends PairwiseAggregator.Aggregable<T>>

Enclosing class:
PairwiseAggregator<T extends PairwiseAggregator.Aggregable<T>>

public static interface PairwiseAggregator.Provider<T extends PairwiseAggregator.Aggregable<T>>

Provider interface to provide objects to aggregate.


Method Summary
 void add(T instance, int idx)
          Adds to a mutable instance.
 Class<T> getComponentClass()
          Obtains the type of the component this provider provides.
 T getMutableMetrics(int idx)
          Fetches an object that can be used as the aggregation origin.
 void recycle(T metrics)
          Recycles an object after use.
 

Method Detail

getMutableMetrics

T getMutableMetrics(int idx)
Fetches an object that can be used as the aggregation origin.

Parameters:
idx - The object index
Returns:
The mutable object

add

void add(T instance,
         int idx)
Adds to a mutable instance.

Parameters:
instance - The mutable instance
idx - The object index to add

getComponentClass

Class<T> getComponentClass()
Obtains the type of the component this provider provides.

Returns:
The class object representing the type.

recycle

void recycle(T metrics)
Recycles an object after use. The implementation my pool recycled objects for reuse or do nothing, just let the garbage collector handle it.

Parameters:
metrics - The object to recycle