Cortex Android
 All Classes Namespaces Functions Variables
nl.sense_os.cortex.coaching.db.DBBackendSync Class Reference

Public Member Functions

double getLastSuccessfulUpload ()
 
void stop ()
 
void start ()
 
boolean flush (boolean block)
 

Static Public Member Functions

static DBBackendSync getInstance (SensePlatform sensePlatform, TaskDB taskDB, MessageDB messageDB)
 

Detailed Description

This class periodically uploads the Tasks, Messages and Coach states to the CoachingEngine backend.

Author
ted@s.nosp@m.ense.nosp@m.-os.n.nosp@m.l

Member Function Documentation

boolean nl.sense_os.cortex.coaching.db.DBBackendSync.flush ( boolean  block)

Flushes the local objects to the back-end

This functions uploads tasks, messages, coaches in its on thread and will return immediately, when block is set to false.
It will wait for a success/fail upload response when block is true.
Flush will also upload when not on wifi.

Parameters
blockIf true the method will block until the data is successfully uploaded
Returns
Returns true when the upload was successful, when not blocking only when false is returns it has meaning.
double nl.sense_os.cortex.coaching.db.DBBackendSync.getLastSuccessfulUpload ( )

Get the last successful data upload

Returns
The epoch time in seconds of the last fully successful upload
void nl.sense_os.cortex.coaching.db.DBBackendSync.start ( )

Starts uploading local data periodically.

void nl.sense_os.cortex.coaching.db.DBBackendSync.stop ( )

Stops the periodical uploading of data.


The documentation for this class was generated from the following file: