congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RequestLog.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
com.yahoo.bard.webservice.logging.RequestLog

Best Java code snippets using com.yahoo.bard.webservice.logging.RequestLog.clear (Showing top 3 results out of 315)

origin: yahoo/fili

/**
 * Exports a snapshot of the request log of the current thread and also resets the request log for that thread.
 *
 * @return the log context of the current thread
 */
public static RequestLog dump() {
  RequestLog current = RLOG.get();
  RequestLog copy = new RequestLog(current);
  current.clear();
  RLOG.remove();
  return copy;
}
origin: yahoo/fili

/**
 * Overwrite current thread's request log context.
 * It first clears the request log of the current thread and then fills it with the contents found in ctx
 *
 * @param ctx  the log context to restore to current thread's request log
 */
public static void restore(RequestLog ctx) {
  RequestLog current = RLOG.get();
  current.clear();
  current.logId = ctx.logId;
  current.info = ctx.info;
  current.mostRecentTimer = ctx.mostRecentTimer;
  current.times.putAll(ctx.times);
  current.threadIds.addAll(ctx.threadIds);
  current.threadIds.add(Thread.currentThread().getName());
  MDC.put(ID_KEY, current.logId);
}
origin: yahoo/fili

/**
 * Write the request log object of the current thread as JSON.
 * The thread's request log is cleared after a call to this method.
 */
public static void log() {
  RequestLog current = RLOG.get();
  if (current.info == null) {
    LOG.warn("Attempted to log while request log object was uninitialized");
    return;
  }
  LOG.info(export());
  current.clear();
}
com.yahoo.bard.webservice.loggingRequestLogclear

Javadoc

Resets the contents of a request log at the calling thread.

Popular methods of RequestLog

  • dump
  • restore
  • copy
    Exports a snapshot of the request log of the current thread without resetting the request log for th
  • log
  • startTiming
  • stopTiming
  • <init>
    Copy constructor is also private.
  • accumulate
    Accumulates timings and threads to current thread's request log context. It fills in the contents fo
  • addIdPrefix
    Prepend an id prefix to generated druid query id.
  • aggregateDurations
    Adds the durations in milliseconds of all the recorded timed phases to a map.
  • durations
    Adds the durations in milliseconds of all the recorded timed phases to a map.
  • export
    Exports current thread's request log object as a formatted string without resetting it.
  • durations,
  • export,
  • getId,
  • getLoginfoOrder,
  • init,
  • isRunning,
  • record,
  • registerTime,
  • retrieve

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now