Address Puller API Feedback
1. Rename registerPullAtomCallback to setPullAtomCallback
2. Rename unregisterPullAtomCallback to clearPullAtomCallback
3. Add getters to PullAtomMetadata
4. Change Ns to Millis (when I tried to make it Nanos, I received a
built time error saying to prefer millis unless we need the precision.
We do not need the precision, so I changed it).
5. Fix out of order params.
I did not change usePooledBuffer to setPooledBuffer because I think use
is more appropriate for our use case.
Test: make
Test: atest PullAtomMetadataTest
Test: atest GtsStatsdHostTestCases
Bug: 149475498
Change-Id: Ib07aa57a6e02c77917fe0e65a3d4a77c00ce8565
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index e6723c8..c256e1f 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -167,8 +167,9 @@
/**
* Binder call to register a callback function for a pulled atom.
*/
- virtual Status registerPullAtomCallback(int32_t uid, int32_t atomTag, int64_t coolDownNs,
- int64_t timeoutNs, const std::vector<int32_t>& additiveFields,
+ virtual Status registerPullAtomCallback(
+ int32_t uid, int32_t atomTag, int64_t coolDownMillis, int64_t timeoutMillis,
+ const std::vector<int32_t>& additiveFields,
const shared_ptr<IPullAtomCallback>& pullerCallback) override;
/**