IT. Expert System.

Android Reference

NetworkStatsHistory


android.net

Class NetworkStatsHistory

  • All Implemented Interfaces:
    Parcelable


    public class NetworkStatsHistory
    extends Object
    implements Parcelable
    Collection of historical network statistics, recorded into equally-sized "buckets" in time. Internally it stores data in long series for more efficient persistence.

    Each bucket is defined by a bucketStart timestamp, and lasts for bucketDuration. Internally assumes that bucketStart is sorted at all times.

    • Constructor Detail

      • NetworkStatsHistory

        public NetworkStatsHistory(long bucketDuration)
      • NetworkStatsHistory

        public NetworkStatsHistory(long bucketDuration,
                           int initialSize)
      • NetworkStatsHistory

        public NetworkStatsHistory(long bucketDuration,
                           int initialSize,
                           int fields)
      • NetworkStatsHistory

        public NetworkStatsHistory(NetworkStatsHistory existing,
                           long bucketDuration)
      • NetworkStatsHistory

        public NetworkStatsHistory(Parcel in)
    • Method Detail

      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • size

        public int size()
      • getBucketDuration

        public long getBucketDuration()
      • getStart

        public long getStart()
      • getEnd

        public long getEnd()
      • getTotalBytes

        public long getTotalBytes()
        Return total bytes represented by this history.
      • getIndexBefore

        public int getIndexBefore(long time)
        Return index of bucket that contains or is immediately before the requested time.
      • getIndexAfter

        public int getIndexAfter(long time)
        Return index of bucket that contains or is immediately after the requested time.
      • recordData

        @Deprecated
        public void recordData(long start,
                                 long end,
                                 long rxBytes,
                                 long txBytes)
        Deprecated.
        Record that data traffic occurred in the given time range. Will distribute across internal buckets, creating new buckets as needed.
      • recordData

        public void recordData(long start,
                      long end,
                      NetworkStats.Entry entry)
        Record that data traffic occurred in the given time range. Will distribute across internal buckets, creating new buckets as needed.
      • recordEntireHistory

        public void recordEntireHistory(NetworkStatsHistory input)
        Record an entire NetworkStatsHistory into this history. Usually for combining together stats for external reporting.
      • recordHistory

        public void recordHistory(NetworkStatsHistory input,
                         long start,
                         long end)
        Record given NetworkStatsHistory into this history, copying only buckets that atomically occur in the inclusive time range. Doesn't interpolate across partial buckets.
      • removeBucketsBefore

        @Deprecated
        public void removeBucketsBefore(long cutoff)
        Deprecated.
        Remove buckets older than requested cutoff.
      • generateRandom

        @Deprecated
        public void generateRandom(long start,
                                     long end,
                                     long bytes)
        Deprecated. only for temporary testing
      • generateRandom

        @Deprecated
        public void generateRandom(long start,
                                     long end,
                                     long rxBytes,
                                     long rxPackets,
                                     long txBytes,
                                     long txPackets,
                                     long operations,
                                     Random r)
        Deprecated. only for temporary testing
      • randomLong

        public static long randomLong(Random r,
                      long start,
                      long end)
      • dump

        public void dump(com.android.internal.util.IndentingPrintWriter pw,
                boolean fullHistory)
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • estimateResizeBuckets

        public int estimateResizeBuckets(long newBucketDuration)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2606 / 248565389. Delta: 0.05394 с