de.uka.ipd.sdq.ByCounter.execution
Class CollectionStrategyWishedInlining

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.execution.AbstractCollectionStrategy
      extended by de.uka.ipd.sdq.ByCounter.execution.CollectionStrategyWishedInlining

public class CollectionStrategyWishedInlining
extends AbstractCollectionStrategy

This class can be used in addition to CountingResultCollector in order to achieve result inlining for specific methods during result collection. Inlining means that instead of holding every individual result, results are added up into shared counters.

The goal of this strategy is to provide a collection strategy with a strong limit in used memory.

Author:
Martin Krogmann, Michael Kuperberg

Constructor Summary
CollectionStrategyWishedInlining(CountingResultCollector parent)
           
 
Method Summary
 void clearResults()
          Clear the result storage fields.
 boolean protocolCount(ProtocolCountStructure result, long reportingStart)
          Add to wished inlining result.
 java.util.SortedSet<CountingResult> retrieveAllCountingResults()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionStrategyWishedInlining

public CollectionStrategyWishedInlining(CountingResultCollector parent)
Method Detail

clearResults

public void clearResults()
Description copied from class: AbstractCollectionStrategy
Clear the result storage fields.

Specified by:
clearResults in class AbstractCollectionStrategy

protocolCount

public boolean protocolCount(ProtocolCountStructure result,
                             long reportingStart)
Add to wished inlining result.

Specified by:
protocolCount in class AbstractCollectionStrategy
Parameters:
result - The result to add.
reportingStart - This is ignored for this strategy.
Returns:
True, when the result is accepted by the strategy. False, when the result needs to be handled by a different strategy.

retrieveAllCountingResults

public java.util.SortedSet<CountingResult> retrieveAllCountingResults()
Specified by:
retrieveAllCountingResults in class AbstractCollectionStrategy
Returns:
The CountingResults produced from the handling and accepting of results by this strategy.