Add a getter for the active tag

Change-Id: I597e041867fba7efae41feea63fa196bc10e4aa2
This commit is contained in:
Alon Albert
2011-07-19 11:16:09 +03:00
committed by Jeff Sharkey
parent 861849e10e
commit 2c295f0c6d

View File

@@ -96,6 +96,15 @@ public class TrafficStats {
NetworkManagementSocketTagger.setThreadSocketStatsTag(tag);
}
/**
* Get the active tag used when accounting {@link Socket} traffic originating
* from the current thread. Only one active tag per thread is supported.
* {@link #tagSocket(Socket)}.
*/
public static int getThreadStatsTag() {
return NetworkManagementSocketTagger.getThreadSocketStatsTag();
}
/**
* @deprecated unsupported, will eventually be removed
*/