org.springframework.retry.support
Class RetrySimulation

java.lang.Object
  extended by org.springframework.retry.support.RetrySimulation

public class RetrySimulation
extends Object

The results of a simulation.


Nested Class Summary
static class RetrySimulation.SleepSequence
           
 
Constructor Summary
RetrySimulation()
           
 
Method Summary
 void addSequence(List<Long> sleeps)
          Add a sequence of sleeps to the simulation.
 RetrySimulation.SleepSequence getLongestTotalSleepSequence()
           
 List<Long> getUniqueSleeps()
           
 List<Long> getUniqueSleepsHistogram()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetrySimulation

public RetrySimulation()
Method Detail

addSequence

public void addSequence(List<Long> sleeps)
Add a sequence of sleeps to the simulation.


getUniqueSleeps

public List<Long> getUniqueSleeps()
Returns:
Returns a list of all the unique sleep values which were executed within all simulations.

getUniqueSleepsHistogram

public List<Long> getUniqueSleepsHistogram()
Returns:
the count of each sleep which was seen throughout all sleeps. histogram[i] = sum(getUniqueSleeps()[i])

getLongestTotalSleepSequence

public RetrySimulation.SleepSequence getLongestTotalSleepSequence()
Returns:
the longest total time slept by a retry sequence.


Copyright © 2012 SpringSource. All Rights Reserved.