Package com.wireguard.android.backend
Class Statistics
- java.lang.Object
-
- com.wireguard.android.backend.Statistics
-
public class Statistics extends java.lang.ObjectClass representing transfer statistics for aTunnelinstance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisStale()Check if the statistics are stale, indicating the need for theBackendto update them.longpeerRx(Key peer)Key[]peers()Get the list of peers being tracked by this instance.longpeerTx(Key peer)longtotalRx()Get the total received traffic by all the peers being tracked by this instancelongtotalTx()Get the total transmitted traffic by all the peers being tracked by this instance
-
-
-
Method Detail
-
isStale
public boolean isStale()
Check if the statistics are stale, indicating the need for theBackendto update them.- Returns:
- boolean indicating if the current statistics instance has stale values.
-
peerRx
public long peerRx(Key peer)
-
peerTx
public long peerTx(Key peer)
-
peers
public Key[] peers()
Get the list of peers being tracked by this instance.
-
totalRx
public long totalRx()
Get the total received traffic by all the peers being tracked by this instance- Returns:
- a long representing the number of bytes received by the peers being tracked.
-
totalTx
public long totalTx()
Get the total transmitted traffic by all the peers being tracked by this instance- Returns:
- a long representing the number of bytes transmitted by the peers being tracked.
-
-