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

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

public class CollectionStrategyDefault
extends AbstractCollectionStrategy

This class is used in CountingResultCollector in order to process results during result collection when no other strategy is specified.

Author:
Martin Krogmann

Constructor Summary
CollectionStrategyDefault(CountingResultCollector parent)
          Construct the strategy object.
 
Method Summary
static de.uka.ipd.sdq.ByCounter.execution.CollectionStrategyDefault.NewArrayTypeAndDimension analyzeArrayParams(long[] newArrayCounts, java.lang.String[] newArrayDescr, int[] newArrayTypeOrDim)
          Decode the information saved for array parameters.
 void clearResults()
          Clear the result storage fields.
 boolean protocolCount(ProtocolCountStructure result, long reportingStart)
          Add to counting results.
 java.util.SortedSet<CountingResult> retrieveAllCountingResults()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionStrategyDefault

public CollectionStrategyDefault(CountingResultCollector parent)
Construct the strategy object.

Parameters:
parent - CountingResultCollector using this strategy.
Method Detail

clearResults

public void clearResults()
Clear the result storage fields.

Specified by:
clearResults in class AbstractCollectionStrategy

analyzeArrayParams

public static de.uka.ipd.sdq.ByCounter.execution.CollectionStrategyDefault.NewArrayTypeAndDimension analyzeArrayParams(long[] newArrayCounts,
                                                                                                                       java.lang.String[] newArrayDescr,
                                                                                                                       int[] newArrayTypeOrDim)
Decode the information saved for array parameters.

Parameters:
newArrayCounts - Array initialisation counts reported from ByCounter
newArrayDescr - Array descriptors reported from ByCounter
newArrayTypeOrDim - Array types/dimensions reported from ByCounter

protocolCount

public boolean protocolCount(ProtocolCountStructure result,
                             long reportingStart)
Add to counting results.

Specified by:
protocolCount in class AbstractCollectionStrategy
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 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.