com.sleepycat.je.utilint
Class LongMaxStat

java.lang.Object
  extended by com.sleepycat.je.utilint.Stat<Long>
      extended by com.sleepycat.je.utilint.LongStat
          extended by com.sleepycat.je.utilint.LongMaxStat
All Implemented Interfaces:
Serializable, Cloneable

public class LongMaxStat
extends LongStat

A long stat which maintains a maximum value. It is initialized to Long.MIN_VALUE. The setMax() methods assigns the counter to MAX(counter, new value).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sleepycat.je.utilint.LongStat
counter
 
Fields inherited from class com.sleepycat.je.utilint.Stat
definition, FORMAT
 
Constructor Summary
LongMaxStat(StatGroup group, StatDefinition definition)
           
LongMaxStat(StatGroup group, StatDefinition definition, long counter)
           
 
Method Summary
 void clear()
          Initialize the stat to the proper value at startup, or reset the stat when copyAndClear() is called.
(package private)  String getFormattedValue()
          Return a string with the stat value formatted as appropriate for its type.
 void setMax(long newValue)
          Set stat to MAX(current stat value, newValue).
 
Methods inherited from class com.sleepycat.je.utilint.LongStat
add, add, get, increment, set
 
Methods inherited from class com.sleepycat.je.utilint.Stat
copy, copyAndClear, getDefinition, toString, toStringVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongMaxStat

public LongMaxStat(StatGroup group,
                   StatDefinition definition)

LongMaxStat

public LongMaxStat(StatGroup group,
                   StatDefinition definition,
                   long counter)
Method Detail

clear

public void clear()
Description copied from class: Stat
Initialize the stat to the proper value at startup, or reset the stat when copyAndClear() is called.

Overrides:
clear in class LongStat

setMax

public void setMax(long newValue)
Set stat to MAX(current stat value, newValue).


getFormattedValue

String getFormattedValue()
Description copied from class: Stat
Return a string with the stat value formatted as appropriate for its type.

Overrides:
getFormattedValue in class LongStat


Copyright (c) 2004-2010 Oracle. All rights reserved.