Show / Hide Table of Contents

    Class LocalDataStore

    A LocalDataStore accumulates data on the device. Periodically, data are written from the LocalDataStore to a RemoteDataStore for permanent storage.

    Inheritance
    System.Object
    DataStore
    LocalDataStore
    FileLocalDataStore
    Inherited Members
    DataStore.StartAsync()
    DataStore.StopAsync()
    DataStore.RestartAsync()
    DataStore.TestHealthAsync(List<AnalyticsTrackedEvent>)
    DataStore.Reset()
    DataStore.Copy()
    DataStore.Running
    DataStore.Protocol
    DataStore.CaptionText
    DataStore.DisplayName
    DataStore.UpdatedCaptionText
    Namespace: Sensus.DataStores.Local
    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

    IsTooLarge()

    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)

    Writes a single Datum to the LocalDataStore.

    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

    WriteToRemoteIfTooLargeAsync(CancellationToken)

    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
    Back to top Copyright © 2014-2018 University of Virginia
    Generated by DocFX