Brooklyn

brooklyn.policy.autoscaling
[Java] Class SizeHistory

java.lang.Object
  brooklyn.policy.autoscaling.SizeHistory

public class SizeHistory

Using a TimeWindowedList, tracks the recent history of values to allow a summary of those values to be obtained.

Authors:
aled


Nested Class Summary
static class SizeHistory.WindowSummary

 
Method Summary
java.lang.Object SizeHistory(long windowSize)

void add(int val)

void setWindowSize(long newWindowSize)

SizeHistory.WindowSummary summarizeWindow(long windowSize)

Summarises the history of values in this time window, with a few special things:

  • If entire time-window is not covered by the given values, then min is Integer.MIN_VALUE and max is Integer.MAX_VALUE
  • If no values, then latest is -1
  • If no recent values, then keeps last-seen value (no matter how old), to use that
  • "stable for growth" means that since that max value, there have not been any higher values
  • "stable for shrinking" means that since that low value, there have not been any lower values

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

SizeHistory

public java.lang.Object SizeHistory(long windowSize)


add

public void add(int val)


setWindowSize

public void setWindowSize(long newWindowSize)


summarizeWindow

public SizeHistory.WindowSummary summarizeWindow(long windowSize)
Summarises the history of values in this time window, with a few special things:


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.