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

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.execution.AbstractCollectionStrategy
Direct Known Subclasses:
CollectionStrategyDefault, CollectionStrategyForceInlining, CollectionStrategyWishedInlining

public abstract class AbstractCollectionStrategy
extends java.lang.Object

Interface used by CountingResultCollector to control different methods of result collection and storage.

Author:
Martin Krogmann

Constructor Summary
AbstractCollectionStrategy(CountingResultCollector parent)
          Construction of the strategy object.
 
Method Summary
abstract  void clearResults()
          Clear the result storage fields.
abstract  boolean protocolCount(ProtocolCountStructure result, long reportingStart)
          Protocol the count to the collection strategy.
abstract  java.util.SortedSet<CountingResult> retrieveAllCountingResults()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCollectionStrategy

public AbstractCollectionStrategy(CountingResultCollector parent)
Construction of the strategy object.

Parameters:
parent - CountingResultCollector that makes use of this strategy.
Method Detail

clearResults

public abstract void clearResults()
Clear the result storage fields.


protocolCount

public abstract boolean protocolCount(ProtocolCountStructure result,
                                      long reportingStart)
Protocol the count to the collection strategy.

Parameters:
result - The result to protocol.
reportingStart - Time stamp of the time of reporting the result.
Returns:
True, when the result is accepted by the strategy. False, when the result needs to be handled by a different strategy.

retrieveAllCountingResults

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