TrafficStatsCompat

public final class TrafficStatsCompat


Helper for accessing features in TrafficStats.

Summary

Public constructors

Public methods

static void

This method is deprecated.

Use clearThreadStatsTag directly.

static int

This method is deprecated.

Use getThreadStatsTag directly.

static void
incrementOperationCount(int operationCount)

This method is deprecated.

Use incrementOperationCount directly.

static void
incrementOperationCount(int tag, int operationCount)

This method is deprecated.

Use incrementOperationCount directly.

static void

This method is deprecated.

Use setThreadStatsTag directly.

static void

Tag the given DatagramSocket with any statistics parameters active for the current thread.

static void
tagSocket(Socket socket)

This method is deprecated.

Use tagSocket directly.

static void

Remove any statistics parameters from the given DatagramSocket.

static void

This method is deprecated.

Use untagSocket directly.

Public constructors

TrafficStatsCompat

public final TrafficStatsCompat()

Public methods

clearThreadStatsTag

public static void clearThreadStatsTag()

Clear active tag used when accounting Socket traffic originating from the current thread.

getThreadStatsTag

public static int getThreadStatsTag()

Get the active tag used when accounting Socket traffic originating from the current thread. Only one active tag per thread is supported. tagSocket.