|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
CachePrinter.java | - | 50% | 50% | 50% |
|
1 | package org.jboss.cache.util; | |
2 | ||
3 | import org.jboss.cache.Cache; | |
4 | import org.jboss.cache.CacheImpl; | |
5 | ||
6 | /** | |
7 | * Helper that prints the contents of a {@link org.jboss.cache.Cache} to a string. | |
8 | * | |
9 | * @author <a href="mailto:manik@jboss.org">Manik Surtani</a> | |
10 | * @since 2.0.0 | |
11 | */ | |
12 | public class CachePrinter | |
13 | { | |
14 | /** | |
15 | * Prints the contents of the cache (nodes + data) to a string | |
16 | * | |
17 | * @param c cache to print | |
18 | * @return a String representation of the cache | |
19 | */ | |
20 | 8 | public static String printCacheDetails(Cache c) |
21 | { | |
22 | // internal cast | |
23 | 8 | CacheImpl ci = (CacheImpl) c; |
24 | 8 | return ci.printDetails(); |
25 | } | |
26 | ||
27 | /** | |
28 | * Prints the status of locks in the cache (nodes + locks) to a string | |
29 | * | |
30 | * @param c cache to print | |
31 | * @return a String representation of the cache | |
32 | */ | |
33 | 0 | public static String printCacheLockingInfo(Cache c) |
34 | { | |
35 | // internal cast | |
36 | 0 | CacheImpl ci = (CacheImpl) c; |
37 | 0 | return ci.printLockInfo(); |
38 | } | |
39 | } |
|