com.sleepycat.je.utilint
Class LongStat

java.lang.Object
  extended by com.sleepycat.je.utilint.Stat<Long>
      extended by com.sleepycat.je.utilint.LongStat
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
IntegralRateStat, LongMaxStat, LongMinStat, LSNStat

public class LongStat
extends Stat<Long>

A long JE stat.

See Also:
Serialized Form

Field Summary
protected  long counter
           
 
Fields inherited from class com.sleepycat.je.utilint.Stat
definition, FORMAT
 
Constructor Summary
LongStat(StatGroup group, StatDefinition definition)
           
LongStat(StatGroup group, StatDefinition definition, long counter)
           
 
Method Summary
 void add(long count)
           
 void add(Stat<Long> other)
          Add the value of "other" to this stat.
 void clear()
          Initialize the stat to the proper value at startup, or reset the stat when copyAndClear() is called.
 Long get()
           
protected  String getFormattedValue()
          Return a string with the stat value formatted as appropriate for its type.
 void increment()
           
 boolean isNotSet()
          Returns true if this stat is zero or null, as is appropriate for its type.
 void set(Long newValue)
          Set the stat value.
 
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
 

Field Detail

counter

protected long counter
Constructor Detail

LongStat

public LongStat(StatGroup group,
                StatDefinition definition)

LongStat

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

get

public Long get()
Specified by:
get in class Stat<Long>
Returns:
the stat value.

set

public void set(Long newValue)
Description copied from class: Stat
Set the stat value.

Specified by:
set in class Stat<Long>

increment

public void increment()

add

public void add(long count)

add

public void add(Stat<Long> other)
Description copied from class: Stat
Add the value of "other" to this stat.

Specified by:
add in class Stat<Long>

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.

Specified by:
clear in class Stat<Long>

getFormattedValue

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

Specified by:
getFormattedValue in class Stat<Long>

isNotSet

public boolean isNotSet()
Description copied from class: Stat
Returns true if this stat is zero or null, as is appropriate for its type.

Specified by:
isNotSet in class Stat<Long>


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