LogReader

public class LogReader
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.LogReader


用於從 REQUESTS 和 EVENTS 讀取記錄的介面 可做為 REQUESTS 和 EVENTS 資料表的資料存取物件。

摘要

公用方法

List<EventLogRecord> getJoinedEvents(long startTimeMillis, long endTimeMillis)

擷取 EventLogRecord 的清單,方法是使用其對應的 RequestLogRecord, 指定時間範圍內的 IsolatedService。

List<RequestLogRecord> getRequests(long startTimeMillis, long endTimeMillis)

擷取此 IsolatedService 寫入的 RequestLogRecords 清單, 指定的時間範圍。

繼承方法

公用方法

getJoinedEvents

public List<EventLogRecord> getJoinedEvents (long startTimeMillis, 
                long endTimeMillis)

擷取 EventLogRecord 的清單,方法是使用其對應的 RequestLogRecord, 指定時間範圍內的 IsolatedService。
此方法可能需要幾秒鐘才能完成,因此應僅從背景工作執行緒呼叫。

參數
startTimeMillis long

endTimeMillis long

傳回
List<EventLogRecord> 此值不能為 null

getRequests

public List<RequestLogRecord> getRequests (long startTimeMillis, 
                long endTimeMillis)

擷取此 IsolatedService 寫入的 RequestLogRecords 清單, 指定的時間範圍。
此方法可能需要幾秒鐘才能完成,因此應僅從背景工作執行緒呼叫。

參數
startTimeMillis long

endTimeMillis long

傳回
List<RequestLogRecord> 此值不能為 null