Show / Hide Table of Contents

    Class FileLocalDataStore

    Stores each Datum as plain-text JSON in a gzip-compressed file on the device's local storage media. Also supports encryption prior to transmission to a RemoteDataStore.

    Inheritance
    System.Object
    DataStore
    LocalDataStore
    FileLocalDataStore
    Implements
    IClearableDataStore
    Inherited Members
    LocalDataStore.WriteToRemoteIfTooLargeAsync(CancellationToken)
    LocalDataStore.ShareLocalDataAsync()
    LocalDataStore.WriteToRemote
    DataStore.RestartAsync()
    DataStore.Reset()
    DataStore.Copy()
    DataStore.Running
    DataStore.Protocol
    DataStore.CaptionText
    DataStore.UpdatedCaptionText
    Namespace: Sensus.DataStores.Local
    Assembly: SensusAndroid.dll
    Syntax
    public class FileLocalDataStore : LocalDataStore, IClearableDataStore

    Constructors

    FileLocalDataStore()

    Declaration
    public FileLocalDataStore()

    Properties

    BufferSizeBytes

    Gets or sets the buffer size in bytes. All Probed data will be held in memory until the buffer is filled, at which time the data will be written to the file. There is not a single-best BufferSizeBytes value. If data are collected at high rates, a higher value will be best to minimize write operations. If data are collected at low rates, a lower value will be best to minimize the likelihood of data loss when the app is killed or crashes (as the buffer resides in RAM).

    Declaration
    [EntryIntegerUiProperty("Buffer Size (Bytes):", true, 2, true)]
    public int BufferSizeBytes { get; set; }
    Property Value
    Type Description
    System.Int32

    The buffer size in bytes.

    CompressionLevel

    Gets or sets the compression level. Options are System.IO.Compression.CompressionLevel.NoCompression (no compression), System.IO.Compression.CompressionLevel.Fastest (computationally faster but less compression), and System.IO.Compression.CompressionLevel.Optimal (computationally slower but more compression).

    Declaration
    [ListUiProperty]
    public CompressionLevel CompressionLevel { get; set; }
    Property Value
    Type Description
    System.IO.Compression.CompressionLevel

    The compression level.

    DisplayName

    Declaration
    public override string DisplayName { get; }
    Property Value
    Type Description
    System.String
    Overrides
    DataStore.DisplayName

    Encrypt

    Whether or not to apply asymmetric-key encryption to data. If this is enabled, then you must either provide a public encryption key to AsymmetricEncryptionPublicKey or use an authentication server. You can generate a public encryption key following the instructions provided for AsymmetricEncryptionPublicKey. Note that data are not encrypted immediately. They are first written to disk on the device where they live unencrypted for a period of time.

    Declaration
    [OnOffUiProperty("Encrypt:", true, 6)]
    public bool Encrypt { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to encrypt; otherwise, false.

    HasDataToShare

    Declaration
    public override bool HasDataToShare { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LocalDataStore.HasDataToShare

    SizeDescription

    Declaration
    public override string SizeDescription { get; }
    Property Value
    Type Description
    System.String
    Overrides
    LocalDataStore.SizeDescription

    StorageDirectory

    Declaration
    public string StorageDirectory { get; }
    Property Value
    Type Description
    System.String

    TotalDataBuffered

    Declaration
    public long TotalDataBuffered { get; }
    Property Value
    Type Description
    System.Int64

    TotalDataWritten

    Declaration
    public long TotalDataWritten { get; }
    Property Value
    Type Description
    System.Int64

    TotalDataWrittenToCurrentFile

    Declaration
    public long TotalDataWrittenToCurrentFile { get; }
    Property Value
    Type Description
    System.Int64

    Methods

    Clear()

    Declaration
    public void Clear()

    CreateTarFromLocalData(String)

    Declaration
    public override void CreateTarFromLocalData(string outputPath)
    Parameters
    Type Name Description
    System.String outputPath
    Overrides
    LocalDataStore.CreateTarFromLocalData(String)

    Flush()

    Declaration
    public void Flush()

    IsTooLarge()

    Declaration
    protected override bool IsTooLarge()
    Returns
    Type Description
    System.Boolean
    Overrides
    LocalDataStore.IsTooLarge()

    StartAsync()

    Declaration
    public override Task StartAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    DataStore.StartAsync()

    StopAsync()

    Declaration
    public override Task StopAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    DataStore.StopAsync()

    TestHealthAsync(List<AnalyticsTrackedEvent>)

    Declaration
    public override Task<HealthTestResult> TestHealthAsync(List<AnalyticsTrackedEvent> events)
    Parameters
    Type Name Description
    System.Collections.Generic.List<AnalyticsTrackedEvent> events
    Returns
    Type Description
    System.Threading.Tasks.Task<HealthTestResult>
    Overrides
    DataStore.TestHealthAsync(List<AnalyticsTrackedEvent>)

    WriteDatum(Datum, CancellationToken)

    Declaration
    public override void WriteDatum(Datum datum, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Datum datum
    System.Threading.CancellationToken cancellationToken
    Overrides
    LocalDataStore.WriteDatum(Datum, CancellationToken)

    WriteToRemoteAsync(CancellationToken)

    Declaration
    public override Task WriteToRemoteAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    LocalDataStore.WriteToRemoteAsync(CancellationToken)

    Implements

    IClearableDataStore
    Back to top Copyright © 2014-2018 University of Virginia
    Generated by DocFX