use of com.android.internal.util.TokenBucket in project platform_frameworks_base by android.
the class IpConnectivityMetrics method makeRateLimitingBuckets.
private static ArrayMap<Class<?>, TokenBucket> makeRateLimitingBuckets() {
ArrayMap<Class<?>, TokenBucket> map = new ArrayMap<>();
// one token every minute, 50 tokens max: burst of ~50 events every hour.
map.put(ApfProgramEvent.class, new TokenBucket((int) DateUtils.MINUTE_IN_MILLIS, 50));
return map;
}
use of com.android.internal.util.TokenBucket in project android_frameworks_base by DirtyUnicorns.
the class IpConnectivityMetrics method makeRateLimitingBuckets.
private static ArrayMap<Class<?>, TokenBucket> makeRateLimitingBuckets() {
ArrayMap<Class<?>, TokenBucket> map = new ArrayMap<>();
// one token every minute, 50 tokens max: burst of ~50 events every hour.
map.put(ApfProgramEvent.class, new TokenBucket((int) DateUtils.MINUTE_IN_MILLIS, 50));
return map;
}
use of com.android.internal.util.TokenBucket in project android_frameworks_base by ResurrectionRemix.
the class IpConnectivityMetrics method makeRateLimitingBuckets.
private static ArrayMap<Class<?>, TokenBucket> makeRateLimitingBuckets() {
ArrayMap<Class<?>, TokenBucket> map = new ArrayMap<>();
// one token every minute, 50 tokens max: burst of ~50 events every hour.
map.put(ApfProgramEvent.class, new TokenBucket((int) DateUtils.MINUTE_IN_MILLIS, 50));
return map;
}
use of com.android.internal.util.TokenBucket in project android_frameworks_base by crdroidandroid.
the class IpConnectivityMetrics method makeRateLimitingBuckets.
private static ArrayMap<Class<?>, TokenBucket> makeRateLimitingBuckets() {
ArrayMap<Class<?>, TokenBucket> map = new ArrayMap<>();
// one token every minute, 50 tokens max: burst of ~50 events every hour.
map.put(ApfProgramEvent.class, new TokenBucket((int) DateUtils.MINUTE_IN_MILLIS, 50));
return map;
}
use of com.android.internal.util.TokenBucket in project android_frameworks_base by AOSPA.
the class IpConnectivityMetrics method makeRateLimitingBuckets.
private static ArrayMap<Class<?>, TokenBucket> makeRateLimitingBuckets() {
ArrayMap<Class<?>, TokenBucket> map = new ArrayMap<>();
// one token every minute, 50 tokens max: burst of ~50 events every hour.
map.put(ApfProgramEvent.class, new TokenBucket((int) DateUtils.MINUTE_IN_MILLIS, 50));
return map;
}
Aggregations