docs.unity3d.com
    Show / Hide Table of Contents

    Class BaseDataConsumer<T>

    Base class for data consumers to inherit from.

    Inheritance
    Object
    BaseDataConsumer<T>
    Namespace: Unity.Simulation
    Syntax
    public abstract class BaseDataConsumer<T>
    Type Parameters
    Name Description
    T

    Constructors

    BaseDataConsumer()

    Declaration
    protected BaseDataConsumer()

    Fields

    _keysToRemove

    Declaration
    protected List<string> _keysToRemove
    Field Value
    Type Description
    List<String>

    _uploadIsArtifact

    Declaration
    protected Dictionary<string, bool> _uploadIsArtifact
    Field Value
    Type Description
    Dictionary<String, Boolean>

    _uploadQueue

    Declaration
    protected Queue<string> _uploadQueue
    Field Value
    Type Description
    Queue<String>

    _uploadsInFlight

    Declaration
    protected Dictionary<string, BaseDataConsumer<T>.Uploadable> _uploadsInFlight
    Field Value
    Type Description
    Dictionary<String, BaseDataConsumer.Uploadable<>>

    kMaxSimultaneousUploads

    Declaration
    protected const int kMaxSimultaneousUploads = 50
    Field Value
    Type Description
    Int32

    kMaxUploadRetryAttempts

    Declaration
    protected const int kMaxUploadRetryAttempts = 5
    Field Value
    Type Description
    Int32

    kUseConsoleLog

    Declaration
    protected const bool kUseConsoleLog = true
    Field Value
    Type Description
    Boolean

    Methods

    _ServiceName()

    Declaration
    protected string _ServiceName()
    Returns
    Type Description
    String

    Consume(Object, Boolean, Boolean)

    Consumes the object data.

    Declaration
    public void Consume(object data, bool synchronous = false, bool isArtifact = true)
    Parameters
    Type Name Description
    Object data

    data to be consumed. Generally a string representing a path.

    Boolean synchronous

    If true, consumption will complete before returning.

    Boolean isArtifact

    A flag indicating if object being consumed is artifact or not.

    ConsumptionStillInProgress()

    Returns true if there is any consumption in progress.

    Declaration
    public bool ConsumptionStillInProgress()
    Returns
    Type Description
    Boolean

    LocalPathToObjectPath(String)

    Implementation for LocalPathToObjectPath must be implemented in derived class.

    Declaration
    public virtual string LocalPathToObjectPath(string localPath)
    Parameters
    Type Name Description
    String localPath
    Returns
    Type Description
    String

    Upload(String, String, Boolean)

    Implementation for Upload must be implemented in derived class.

    Declaration
    public virtual bool Upload(string localPath, string objectPath, bool isArtifact)
    Parameters
    Type Name Description
    String localPath
    String objectPath
    Boolean isArtifact
    Returns
    Type Description
    Boolean

    UploadAsync(Stream, String, Boolean)

    Implementation for UploadAsync must be implemented in derived class.

    Declaration
    public virtual Task<T> UploadAsync(Stream source, string objectPath, bool isArtifact)
    Parameters
    Type Name Description
    Stream source
    String objectPath
    Boolean isArtifact
    Returns
    Type Description
    Task<T>
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023