org.gcube.indexmanagement.featureindexlibrary.commons
Class FeatureIndexStatsContainer

java.lang.Object
  extended by java.lang.Thread
      extended by org.gcube.indexmanagement.featureindexlibrary.commons.FeatureIndexStatsContainer
All Implemented Interfaces:
Runnable

public class FeatureIndexStatsContainer
extends Thread

Statistics container

Author:
UoA

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FeatureIndexStatsContainer(String ServiceClass, String ServiceName, ServiceContextContainer ServiceContextCont)
          Constructor
 
Method Summary
 void addRecords(long number)
          add operations
 void addRecordsTime(long time)
          add records time
 void lookupIndex(long time)
          lookup Index
 void lookupResults(long results)
          number of results
 void newIndexLookup()
          Index lookups
 void newInvocation()
          new invocation
 void newRemoval()
          new removal
 void removalTime(long time)
          removal time
 void run()
           
 String toXML()
          generates an xml serialization of the statistics
 void writeToRI()
          Writes the statistics to the RI profile
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureIndexStatsContainer

public FeatureIndexStatsContainer(String ServiceClass,
                                  String ServiceName,
                                  ServiceContextContainer ServiceContextCont)
Constructor

Parameters:
ServiceClass - the Service class
ServiceName - the service name
Method Detail

newInvocation

public void newInvocation()
new invocation


addRecords

public void addRecords(long number)
add operations

Parameters:
number - the number of records added

addRecordsTime

public void addRecordsTime(long time)
add records time

Parameters:
time - the time of addition

newRemoval

public void newRemoval()
new removal


removalTime

public void removalTime(long time)
removal time

Parameters:
time - the time

newIndexLookup

public void newIndexLookup()
Index lookups


lookupIndex

public void lookupIndex(long time)
lookup Index

Parameters:
time - the time

lookupResults

public void lookupResults(long results)
number of results

Parameters:
results - lookup results

writeToRI

public void writeToRI()
               throws Exception
Writes the statistics to the RI profile

Throws:
Exception - the ri could not be updated

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Runnable.run()

toXML

public String toXML()
generates an xml serialization of the statistics

Returns:
the xml serialization


Copyright © 2012. All Rights Reserved.