org.multiverse.utils.profiling
Interface ProfileRepository

All Known Implementing Classes:
SimpleProfileRepository

public interface ProfileRepository

A repository for profiling information.

Perhaps not needed to tell, but a Profiler should have the lowest amount of performance overhead if possible.

Author:
Peter Veentjer.

Method Summary
 void decCounter(java.lang.String key1, java.lang.String key2)
           
 ProfileCollator getCollator()
          TODO: the methods of ProfileCollator should probably simply be part of the ProfileRepository contract.
 long getCount(java.lang.String key)
          Returns the count for some key.
 long getCount(java.lang.String key1, java.lang.String key2)
           
 java.util.Iterator<java.lang.String> getKey1Iterator()
           
 void incCounter(java.lang.String key)
           
 void incCounter(java.lang.String key, int amount)
           
 void incCounter(java.lang.String key1, java.lang.String key2)
           
 void incCounter(java.lang.String key1, java.lang.String key2, long count)
           
 void reset()
           
 long sumKey1(java.lang.String key2)
           
 long sumKey2(java.lang.String key1)
           
 

Method Detail

getCount

long getCount(java.lang.String key)
Returns the count for some key.

Parameters:
key - the key
Returns:
the count, or -1 if no key was found.
Throws:
java.lang.NullPointerException - if key is null.

incCounter

void incCounter(java.lang.String key)

incCounter

void incCounter(java.lang.String key,
                int amount)

incCounter

void incCounter(java.lang.String key1,
                java.lang.String key2)

incCounter

void incCounter(java.lang.String key1,
                java.lang.String key2,
                long count)

getKey1Iterator

java.util.Iterator<java.lang.String> getKey1Iterator()

getCount

long getCount(java.lang.String key1,
              java.lang.String key2)

sumKey1

long sumKey1(java.lang.String key2)

sumKey2

long sumKey2(java.lang.String key1)

decCounter

void decCounter(java.lang.String key1,
                java.lang.String key2)

reset

void reset()

getCollator

ProfileCollator getCollator()
TODO: the methods of ProfileCollator should probably simply be part of the ProfileRepository contract.

Returns:
a collator for this repository


Copyright © 2008-2010 Multiverse. All Rights Reserved.