Class LocalDataStore
Inheritance
System.Object
LocalDataStore
Assembly: SensusAndroid.dll
Syntax
public abstract class LocalDataStore : DataStore
Constructors
LocalDataStore()
Declaration
protected LocalDataStore()
Properties
HasDataToShare
Declaration
public abstract bool HasDataToShare { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
SizeDescription
Declaration
public abstract string SizeDescription { get; }
Property Value
| Type |
Description |
| System.String |
|
WriteToRemote
Whether or not to transfer data from the local data store to the remote data store. If disabled, data
will accumulate indefinitely on local storage media. When the protocol is stopped, the user may then (if
able to access the protocol settings) offload the data from the phone (e.g., via email attachment).
Declaration
[OnOffUiProperty("Write To Remote:", true, 1)]
public bool WriteToRemote { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
true to write remote; otherwise, false.
|
Methods
CreateTarFromLocalData(String)
Declaration
public abstract void CreateTarFromLocalData(string outputPath)
Parameters
| Type |
Name |
Description |
| System.String |
outputPath |
|
Declaration
protected abstract bool IsTooLarge()
Returns
| Type |
Description |
| System.Boolean |
|
ShareLocalDataAsync()
Declaration
public Task ShareLocalDataAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
WriteDatum(Datum, CancellationToken)
Declaration
public abstract void WriteDatum(Datum datum, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| Datum |
datum |
Datum.
|
| System.Threading.CancellationToken |
cancellationToken |
Cancellation token.
|
WriteToRemoteAsync(CancellationToken)
Declaration
public abstract Task WriteToRemoteAsync(CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Checks whether the current LocalDataStore has grown too large, and (if it has) writes the data to the
RemoteDataStore. This relieves pressure on local resources in cases where the RemoteDataStore
is not triggered frequently enough by its own schedule. It makes sense to call this method periodically after writing
data.
Declaration
protected Task WriteToRemoteIfTooLargeAsync(CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
Cancellation token.
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|