org.jdiameter.server.impl
Class StatisticRecordImpl

java.lang.Object
  extended by org.jdiameter.server.impl.StatisticRecordImpl
All Implemented Interfaces:
org.jdiameter.api.StatisticRecord, IStatisticRecord

public class StatisticRecordImpl
extends java.lang.Object
implements IStatisticRecord


Nested Class Summary
static interface StatisticRecordImpl.Counter
           
 
Field Summary
protected  java.util.concurrent.ConcurrentLinkedQueue<IStatisticRecord> childs
           
protected  StatisticRecordImpl.Counter counter
           
protected  java.lang.String description
           
protected  boolean enable
           
protected  java.lang.String name
           
protected  int type
           
protected  java.util.concurrent.atomic.AtomicLong value
           
 
Constructor Summary
StatisticRecordImpl(java.lang.String name, int type)
           
StatisticRecordImpl(java.lang.String name, java.lang.String description, int type)
           
StatisticRecordImpl(java.lang.String name, java.lang.String description, int type, long value)
           
StatisticRecordImpl(java.lang.String name, java.lang.String description, int type, StatisticRecordImpl.Counter counter)
           
 
Method Summary
 void dec()
          Decrement counter
 void enable(boolean e)
          Enable/Disable counter
 org.jdiameter.api.StatisticRecord[] getChilds()
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 int getType()
           
 double getValueAsDouble()
           
 int getValueAsInt()
           
 long getValueAsLong()
           
 void inc()
          Increment counter
 void reset()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

enable

protected boolean enable

name

protected java.lang.String name

description

protected java.lang.String description

type

protected int type

value

protected java.util.concurrent.atomic.AtomicLong value

childs

protected java.util.concurrent.ConcurrentLinkedQueue<IStatisticRecord> childs

counter

protected StatisticRecordImpl.Counter counter
Constructor Detail

StatisticRecordImpl

public StatisticRecordImpl(java.lang.String name,
                           int type)

StatisticRecordImpl

public StatisticRecordImpl(java.lang.String name,
                           java.lang.String description,
                           int type)

StatisticRecordImpl

public StatisticRecordImpl(java.lang.String name,
                           java.lang.String description,
                           int type,
                           StatisticRecordImpl.Counter counter)

StatisticRecordImpl

public StatisticRecordImpl(java.lang.String name,
                           java.lang.String description,
                           int type,
                           long value)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.jdiameter.api.StatisticRecord

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface org.jdiameter.api.StatisticRecord

getValueAsInt

public int getValueAsInt()
Specified by:
getValueAsInt in interface org.jdiameter.api.StatisticRecord

getValueAsDouble

public double getValueAsDouble()
Specified by:
getValueAsDouble in interface org.jdiameter.api.StatisticRecord

getValueAsLong

public long getValueAsLong()
Specified by:
getValueAsLong in interface org.jdiameter.api.StatisticRecord

getType

public int getType()
Specified by:
getType in interface org.jdiameter.api.StatisticRecord

inc

public void inc()
Description copied from interface: IStatisticRecord
Increment counter

Specified by:
inc in interface IStatisticRecord

dec

public void dec()
Description copied from interface: IStatisticRecord
Decrement counter

Specified by:
dec in interface IStatisticRecord

getChilds

public org.jdiameter.api.StatisticRecord[] getChilds()
Specified by:
getChilds in interface org.jdiameter.api.StatisticRecord

reset

public void reset()
Specified by:
reset in interface org.jdiameter.api.StatisticRecord

enable

public void enable(boolean e)
Description copied from interface: IStatisticRecord
Enable/Disable counter

Specified by:
enable in interface IStatisticRecord
Parameters:
e - on/off parameter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008. All Rights Reserved.