org.jboss.cache.util
Class CachePrinter

java.lang.Object
  extended by org.jboss.cache.util.CachePrinter

public class CachePrinter
extends java.lang.Object

Helper that prints the contents of a Cache to a string.

Since:
2.0.0
Author:
Manik Surtani

Constructor Summary
CachePrinter()
           
 
Method Summary
static java.lang.String formatHtml(java.lang.String s)
          Formats a given String for display as an HTML snippet.
static java.lang.String prettyPrint(long millis)
          Prints a time for display
static java.lang.String printCacheDetails(Cache... c)
          Prints the contents of the cache (nodes + data) to a string
static java.lang.String printCacheInterceptors(CacheSPI<?,?> cache)
           
static java.lang.String printCacheLockingInfo(Cache c)
          Prints the status of locks in the cache (nodes + locks) to a string
static java.lang.String printInterceptorChain(CommandInterceptor i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachePrinter

public CachePrinter()
Method Detail

printCacheDetails

public static java.lang.String printCacheDetails(Cache... c)
Prints the contents of the cache (nodes + data) to a string

Parameters:
c - cache to print
Returns:
a String representation of the cache

printCacheLockingInfo

public static java.lang.String printCacheLockingInfo(Cache c)
Prints the status of locks in the cache (nodes + locks) to a string

Parameters:
c - cache to print
Returns:
a String representation of the cache

printCacheInterceptors

public static java.lang.String printCacheInterceptors(CacheSPI<?,?> cache)

printInterceptorChain

public static java.lang.String printInterceptorChain(CommandInterceptor i)

formatHtml

public static java.lang.String formatHtml(java.lang.String s)
Formats a given String for display as an HTML snippet.

Parameters:
s - string to format
Returns:
formatted string

prettyPrint

public static java.lang.String prettyPrint(long millis)
Prints a time for display

Parameters:
millis - time in millis
Returns:
the time, represented as millis, seconds, minutes or hours as appropriate, with suffix


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.