-
public class DataHandleDataHandle handles the caching and reporting of user data (events and user property Settings). Its work relies on two inner classes, SendMessageWorker and SaveMessageWorker.
-
-
Method Summary
Modifier and Type Method Description static DataHandlegetInstance(Context messageContext)DatabaseAdaptergetDbAdapter(Context context)TDConfiggetConfig(String token)voidhandleTrackPauseToken(String token, boolean isEnable)voidsaveClickData(DataDescription dataDescription)voidpostClickData(DataDescription dataDescription)Immediately reported to the server without caching and retry. voidpostToDebug(DataDescription dataDescription)Debug mode Reports data one by one. voidflush(String token)Clear the queue for the current item and attempt to report it to the server. voidflushOldData(String token)Invoke this interface with caution. voidemptyMessageQueue(String token)Clear all queue data for a given token: data cache and data report. intgetFlushBulkSize(String token)intgetFlushInterval(String token)RemoteServicegetPoster()-
-
Method Detail
-
getInstance
static DataHandle getInstance(Context messageContext)
-
getDbAdapter
DatabaseAdapter getDbAdapter(Context context)
-
handleTrackPauseToken
void handleTrackPauseToken(String token, boolean isEnable)
-
saveClickData
void saveClickData(DataDescription dataDescription)
-
postClickData
void postClickData(DataDescription dataDescription)
Immediately reported to the server without caching and retry.
-
postToDebug
void postToDebug(DataDescription dataDescription)
Debug mode Reports data one by one.
-
flush
void flush(String token)
Clear the queue for the current item and attempt to report it to the server. If the cache queue contains the data of the current token, the cache queue is reported after the cached data is imported to the database.
- Parameters:
token- APP ID
-
flushOldData
void flushOldData(String token)
Invoke this interface with caution. Report the local cache data of the specified APP ID to the server only for compatibility with older versions
- Parameters:
token- App ID
-
emptyMessageQueue
void emptyMessageQueue(String token)
Clear all queue data for a given token: data cache and data report.
- Parameters:
token- App ID
-
getFlushBulkSize
int getFlushBulkSize(String token)
-
getFlushInterval
int getFlushInterval(String token)
-
getPoster
RemoteService getPoster()
-
-
-
-