com.ebay.sdk.logging.ThreadLocalSingleCallMetrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebaysdkcore939 Show documentation
Show all versions of ebaysdkcore939 Show documentation
Repack of the eBay SDK version 939 for repository use
/*
Copyright (c) 2013 eBay, Inc.
This program is licensed under the terms of the eBay Common Development and
Distribution License (CDDL) Version 1.0 (the "License") and any subsequent version
thereof released by eBay. The then-current version of the License can be found
at http://www.opensource.org/licenses/cddl1.php and in the eBaySDKLicense file that
is under the eBay SDK ../docs directory.
*/
package com.ebay.sdk.logging;
/**
* This class provides a thread local SingleCallMetrics, so that during the execution
* of the thread, different classes can access the metrics object to log information.
*
* @author wdeng
*
*/
public class ThreadLocalSingleCallMetrics
{
private static final ThreadLocal THREAD_LOCAL = new ThreadLocal();
public static SingleCallMetrics getSingleCallMetrics()
{
return THREAD_LOCAL.get();
}
public static void resetSingleCallMetrics()
{
THREAD_LOCAL.set(new SingleCallMetrics());
}
}