public class Cat extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
Cat.Context |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
createMessageId() |
static void |
destroy() |
static void |
enableMultiInstances() |
static String |
getCatHome() |
static String |
getCurrentMessageId() |
static Cat |
getInstance() |
static MessageManager |
getManager() |
static MessageProducer |
getProducer() |
static void |
initialize(File configFile) |
static void |
initialize(org.codehaus.plexus.PlexusContainer container,
File configFile) |
static void |
initialize(String... servers) |
static void |
initializeByDomain(String domain,
int port,
int httpPort,
String... servers) |
static void |
initializeByDomain(String domain,
String... servers) |
static boolean |
isInitialized() |
static boolean |
isMultiInstanceEnable() |
static void |
logError(String message,
Throwable cause) |
static void |
logError(Throwable cause) |
static void |
logEvent(String type,
String name) |
static void |
logEvent(String type,
String name,
String status,
String nameValuePairs) |
static void |
logHeartbeat(String type,
String name,
String status,
String nameValuePairs) |
static void |
logMetric(String name,
Object... keyValues) |
static void |
logMetricForCount(String name)
Increase the counter specified by
name by one. |
static void |
logMetricForCount(String name,
int quantity)
Increase the counter specified by
name by one. |
static void |
logMetricForDuration(String name,
long durationInMillis)
Increase the metric specified by
name by durationInMillis. |
static void |
logMetricForSum(String name,
double value)
Increase the sum specified by
name by value only for one item. |
static void |
logMetricForSum(String name,
double sum,
int quantity)
Increase the metric specified by
name by sum for multiple items. |
static void |
logRemoteCallClient(Cat.Context ctx)
logRemoteCallClient is used in rpc client
|
static void |
logRemoteCallClient(Cat.Context ctx,
String domain)
logRemoteCallClient is used in rpc client
|
static void |
logRemoteCallServer(Cat.Context ctx)
used in rpc server,use clild id as server message tree id.
|
static void |
logTrace(String type,
String name) |
static void |
logTrace(String type,
String name,
String status,
String nameValuePairs) |
static <T> T |
lookup(Class<T> role) |
static <T> T |
lookup(Class<T> role,
String hint) |
static Event |
newEvent(String type,
String name) |
static ForkedTransaction |
newForkedTransaction(String type,
String name) |
static Heartbeat |
newHeartbeat(String type,
String name) |
static TaggedTransaction |
newTaggedTransaction(String type,
String name,
String tag) |
static Trace |
newTrace(String type,
String name) |
static Transaction |
newTransaction(String type,
String name) |
static void |
reset() |
static void |
setup(String sessionToken) |
public static String createMessageId()
public static void destroy()
public static String getCatHome()
public static String getCurrentMessageId()
public static Cat getInstance()
public static MessageManager getManager()
public static MessageProducer getProducer()
public static void initialize(File configFile)
public static void initialize(org.codehaus.plexus.PlexusContainer container,
File configFile)
public static void initialize(String... servers)
public static void initializeByDomain(String domain, int port, int httpPort, String... servers)
public static boolean isInitialized()
public static void logError(Throwable cause)
public static void logEvent(String type, String name, String status, String nameValuePairs)
public static void logHeartbeat(String type, String name, String status, String nameValuePairs)
public static void logMetricForCount(String name)
name by one.name - the name of the metric default count value is 1public static void logMetricForCount(String name, int quantity)
name by one.name - the name of the metricpublic static void logMetricForDuration(String name, long durationInMillis)
name by durationInMillis.name - the name of the metricdurationInMillis - duration in milli-second added to the metricpublic static void logMetricForSum(String name, double value)
name by value only for one item.name - the name of the metricvalue - the value added to the metricpublic static void logMetricForSum(String name, double sum, int quantity)
name by sum for multiple items.name - the name of the metricsum - the sum value added to the metricquantity - the quantity to be accumulatedpublic static void logRemoteCallClient(Cat.Context ctx)
ctx - ctx is rpc context ,such as duboo context , please use rpc context implement Contextdomain - domain is default, if use default config, the performance of server storage is bad。public static void logRemoteCallClient(Cat.Context ctx, String domain)
ctx - ctx is rpc context ,such as duboo context , please use rpc context implement Contextdomain - domain is project name of rpc server namepublic static void logRemoteCallServer(Cat.Context ctx)
ctx - ctx is rpc context ,such as duboo context , please use rpc context implement Contextpublic static void logTrace(String type, String name, String status, String nameValuePairs)
public static <T> T lookup(Class<T> role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic static <T> T lookup(Class<T> role, String hint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic static ForkedTransaction newForkedTransaction(String type, String name)
public static TaggedTransaction newTaggedTransaction(String type, String name, String tag)
public static Transaction newTransaction(String type, String name)
public static void reset()
public static void setup(String sessionToken)
public static boolean isMultiInstanceEnable()
public static void enableMultiInstances()
Copyright © 2022. All rights reserved.