Class TracerFactory
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.trace.TracerFactory
-
- All Implemented Interfaces:
TracerFactoryMBean
public class TracerFactory extends Object implements TracerFactoryMBean
- Since:
- 5.7.3 The Automation tracer factory service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTracerFactory.ChainTraces
-
Field Summary
Fields Modifier and Type Field Description static StringAUTOMATION_TRACE_PRINTABLE_PROPERTYstatic StringAUTOMATION_TRACE_PROPERTYprotected static IntegerCACHE_CONCURRENCY_LEVELprotected static IntegerCACHE_MAXIMUM_SIZEprotected static IntegerCACHE_TIMEOUTprotected TracelastErrorprotected Stringprintableprotected Function<String,Boolean>printableAssertorprotected booleanrecordingprotected com.google.common.cache.Cache<String,TracerFactory.ChainTraces>tracesCache
-
Constructor Summary
Constructors Constructor Description TracerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearTrace(OperationChain chain)voidclearTrace(OperationChain chain, int index)voidclearTraces()protected static StringformatKey(OperationType chain, int index)TracegetLastErrorTrace()StringgetPrintableTraces()booleangetRecordingState()TracegetTrace(String key)TracegetTrace(String key, int index)TracegetTrace(OperationChain chain, int index)CallnewCall(OperationType chain, OperationContext context, OperationType type, InvokableMethod method, Map<String,Object> params)If trace mode is enabled, instantiateCall.TracenewTrace(Call parent, OperationType typeof, List<Call> calls, Object output, Exception error)OperationCallbacknewTracer()voidonTrace(Trace trace)Stringprint(Trace trace)protected voidrecordTrace(Trace trace)StringsetPrintableTraces(String option)booleantoggleRecording()
-
-
-
Field Detail
-
AUTOMATION_TRACE_PROPERTY
public static final String AUTOMATION_TRACE_PROPERTY
- See Also:
- Constant Field Values
-
AUTOMATION_TRACE_PRINTABLE_PROPERTY
public static final String AUTOMATION_TRACE_PRINTABLE_PROPERTY
- See Also:
- Constant Field Values
-
CACHE_CONCURRENCY_LEVEL
protected static final Integer CACHE_CONCURRENCY_LEVEL
-
CACHE_MAXIMUM_SIZE
protected static final Integer CACHE_MAXIMUM_SIZE
-
CACHE_TIMEOUT
protected static final Integer CACHE_TIMEOUT
-
printable
protected String printable
-
tracesCache
protected com.google.common.cache.Cache<String,TracerFactory.ChainTraces> tracesCache
-
recording
protected boolean recording
-
lastError
protected Trace lastError
-
-
Method Detail
-
newTracer
public OperationCallback newTracer()
-
newCall
public Call newCall(OperationType chain, OperationContext context, OperationType type, InvokableMethod method, Map<String,Object> params)
-
newTrace
public Trace newTrace(Call parent, OperationType typeof, List<Call> calls, Object output, Exception error)
-
recordTrace
protected void recordTrace(Trace trace)
-
getTrace
public Trace getTrace(OperationChain chain, int index)
-
getTrace
public Trace getTrace(String key)
- Parameters:
key- The name of the chain.- Returns:
- The last trace of the given chain.
-
getLastErrorTrace
public Trace getLastErrorTrace()
-
clearTrace
public void clearTrace(OperationChain chain, int index)
-
clearTrace
public void clearTrace(OperationChain chain)
-
clearTraces
public void clearTraces()
- Specified by:
clearTracesin interfaceTracerFactoryMBean
-
formatKey
protected static String formatKey(OperationType chain, int index)
-
onTrace
public void onTrace(Trace trace)
-
toggleRecording
public boolean toggleRecording()
- Specified by:
toggleRecordingin interfaceTracerFactoryMBean
-
getRecordingState
public boolean getRecordingState()
- Specified by:
getRecordingStatein interfaceTracerFactoryMBean
-
getPrintableTraces
public String getPrintableTraces()
- Specified by:
getPrintableTracesin interfaceTracerFactoryMBean
-
setPrintableTraces
public String setPrintableTraces(String option)
- Specified by:
setPrintableTracesin interfaceTracerFactoryMBean
-
-