org.multiverse.utils.monitoring
Class ProfilePublisher.KeyedProfilePage<K>
java.lang.Object
org.multiverse.utils.monitoring.ProfilePublisher.KeyedProfilePage<K>
- Type Parameters:
K - the type of the key
- All Implemented Interfaces:
- ProfileCollator.ProfilePage
- Enclosing class:
- ProfilePublisher
public abstract static class ProfilePublisher.KeyedProfilePage<K>
- extends java.lang.Object
- implements ProfileCollator.ProfilePage
A profile page that will display as follows:
'<profileName>'
<key> <key> ... | <hdr> <hdr> <hdr> ...
---------------------------------
<id> <id> ... | <val> <val> <val> ...
...
<hdr> = <full header name>
...
Implementing classes are responsible for appropriately identifying and displaying the key.
|
Constructor Summary |
ProfilePublisher.KeyedProfilePage(java.lang.String name,
java.util.List<java.lang.String> statLabels,
java.util.Map<K,java.util.List<java.lang.Long>> statistics)
|
ProfilePublisher.KeyedProfilePage(java.lang.String name,
java.util.List<java.lang.String> statLabels,
java.util.Map<K,java.util.List<java.lang.Long>> statistics,
int valueColumnWidth)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ProfilePublisher.KeyedProfilePage
public ProfilePublisher.KeyedProfilePage(java.lang.String name,
java.util.List<java.lang.String> statLabels,
java.util.Map<K,java.util.List<java.lang.Long>> statistics)
ProfilePublisher.KeyedProfilePage
public ProfilePublisher.KeyedProfilePage(java.lang.String name,
java.util.List<java.lang.String> statLabels,
java.util.Map<K,java.util.List<java.lang.Long>> statistics,
int valueColumnWidth)
getName
public java.lang.String getName()
- Specified by:
getName in interface ProfileCollator.ProfilePage
- Returns:
- the name of the profile page
getStatistics
public java.util.Map<java.lang.Object,java.util.List<java.lang.Long>> getStatistics()
- Specified by:
getStatistics in interface ProfileCollator.ProfilePage
- Returns:
- a map from keys to the statistics for that key. What a key is will depend on the type of profile
page; an example might be a transaction ID. The number and sequence of the values of the statistics
must match the number and sequence of the labels returned by
ProfileCollator.ProfilePage.getStatLabels()
getStatLabels
public java.util.List<java.lang.String> getStatLabels()
- Specified by:
getStatLabels in interface ProfileCollator.ProfilePage
- Returns:
- the labels (names) of the collected statistics
getFormattedKeyLabels
protected abstract java.lang.String getFormattedKeyLabels()
toFormattedString
protected abstract java.lang.String toFormattedString(K key)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
truncate
protected static java.lang.String truncate(java.lang.String original,
int length)
Copyright © 2008-2010 Multiverse. All Rights Reserved.