com.bigdata.counters
Class History.SampleIterator

java.lang.Object
  extended by com.bigdata.counters.History.SampleIterator
All Implemented Interfaces:
Iterator<IHistoryEntry<T>>
Enclosing class:
History<T>

public class History.SampleIterator
extends Object
implements Iterator<IHistoryEntry<T>>

Takes a snapshot of the samples in the History and then visits those samples.

Version:
$Id: History.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
protected History.SampleIterator()
           
 
Method Summary
 long getFirstSampleTime()
          The timestamp associated with the first sample.
 long getLastSampleTime()
          The timestamp associated with the last sample.
 int getSampleCount()
          The #of slots with sampled data.
 boolean hasNext()
           
 IHistoryEntry<T> next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

History.SampleIterator

protected History.SampleIterator()
Method Detail

getSampleCount

public int getSampleCount()
The #of slots with sampled data.


getFirstSampleTime

public long getFirstSampleTime()
The timestamp associated with the first sample.

Returns:
The timestamp -or- -1 if there are no samples.

getLastSampleTime

public long getLastSampleTime()
The timestamp associated with the last sample.

Returns:
The timestamp -or- -1 if there are no samples.

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<IHistoryEntry<T>>

next

public IHistoryEntry<T> next()
Specified by:
next in interface Iterator<IHistoryEntry<T>>

remove

public void remove()
Specified by:
remove in interface Iterator<IHistoryEntry<T>>


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.