Class CloudLibraryWatchdog

Manages upload and download for the project library from the cloud server.

Constructors

Accessors

  • get catalogJson(): JsonObject
  • Gets the current catalog json from the most-recent sync operation.

    Returns JsonObject

    Catalog JSON.

    Thread-safe.

    This operation should only be used for debug purposes as a large JSON object must be copied.

  • get isDeltaApplyEnabled(): boolean
  • True if we're allowing new deltas to be ingested.

    Returns boolean

  • set isDeltaApplyEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isIdle(): boolean
  • Determines if the watchdog is idle. That means, not downloading, uploading or fetching the project catalog.

    Returns boolean

  • get isPendingConflictsResolution(): boolean
  • Checks if there are any conflicted files pending resolution.

    Returns boolean

  • get isReadOnly(): boolean
  • Determines if the readonly mode is enabled. Packages can be downloaded, but not uploaded or deleted.

    Returns boolean

  • get isRuntimeStreaming(): boolean
  • Determines if the runtime streaming mode is enabled. Packages can be downloaded from a deployment location.

    Returns boolean

Methods

  • Starts download of the resource from the server.

    Parameters

    • uuid: UUID

      UUID of the resource to download.

    • forceDownload: boolean

      Forces the download, even when it's not required.

    • prioritize: boolean

      Prioritizes the download by moving it to the top of the queue.

    Returns AsyncOp<CloudOperationResult, void>

    Object that can be used for tracking the status of the operation.

  • Gets the catalog entry for the resource with provided UUID from the catalog. Uses information from the last performed Sync() operation.

    Parameters

    Returns CatalogEntry

    The optional CatalogEntry.

    Thread-safe.

  • Retrieves all current out-of-band data from the server, for the provided project file.

    Parameters

    • projectUUID: UUID

      The UUID of the project the file belongs to.

    • fileUUID: UUID

      The UUID of the file to retrieve out-of-band data for.

    Returns UncertainAsyncOp<JsonObject, string>

    An AsyncOp that will be resolved once the request is done or failed.

  • Gets the external resource UUIDs for the projectReferenceUUID from the most-recent sync operation.

    Parameters

    • projectReferenceUUID: UUID

    Returns UUID[]

    Resource UUIDs part of the external project.

    Thread-safe.

  • Checks is the resource with provided UUID in the catalog. Uses information from the last performed Sync() operation.

    Parameters

    Returns boolean

    True if the entry is contained in the catalog.

    Thread-safe.

  • Updates the out-of-band data for the current user on the server, for the provided project file.

    Parameters

    • projectUUID: UUID

      The UUID of the project the file belongs to.

    • fileUUID: UUID

      The UUID of the file to update out-of-band data for.

    • data: JsonObject

      The new out-of-band data to be updated. Missing entries will be kept, however entries with a null value will be removed completely.

    Returns UncertainAsyncOp<JsonObject, string>

    An AsyncOp that will be resolved once the request is done or failed.

  • If disabled, the watchdog will not perform any operations until re-enabled.

    Parameters

    • isSyncing: boolean

    Returns void

  • Retrieves the latest catalog from the cloud server and checks for local changes. Queues upload, download and delete operations accordingly.

    Parameters

    • OptionalisSyncingAllData: boolean

      If true, all data will be downloaded, including streaming data which would normally be downloaded on-demand.

    Returns AsyncOp<CloudOperationResult, void>

    Object that can be used for tracking the status of the operation.

  • Checks if the provided scene has any local changes, and if so generates a delta and uploads it to the server. If the server has changes the local changes will be rolled back and re-applied on the server changes, without requiring user intervention.

    Parameters

    Returns AsyncOp<CloudOperationResult, void>

    Object that can be used for tracking the status of the operation.

  • Pops an action from the watchdog action queue, if one exists. Returns null otherwise. Actions can be used to track watchdog progress by an external system.

    Returns WatchdogAction

  • Unlocks a previously locked resource.

    Parameters

    • uuid: UUID

      UUID of the resource to unlock.

    • lockId: string

      Lock ID of the previously acquired lock.

    Returns AsyncOp<CloudOperationResult, void>

    Object that can be used for tracking the status of the operation.

  • Updates the conflict resolution for the resource with the specified uuid to the resolution type.

    Parameters

    Returns boolean

  • Starts upload of a local resource. Resource must have been previously locked via LockFile().

    Parameters

    • uuid: UUID

      UUID of the resource to upload. Current version from the project library will be uploaded.

    • lockId: string

      Lock ID of the acquired lock on the resource.

    Returns AsyncOp<CloudOperationResult, void>

    Object that can be used for tracking the status of the operation.

Events

onDetermineCodeResourceUploadBlock: Event<[], boolean>

Triggered when the watchdog needs to determine if code resource uploads are blocked.

onProjectReferenceAdded: Event<[Immutable<CatalogProjectReference>], void>

Triggered when a new reference was added.

onProjectReferenceRemoved: Event<[Immutable<CatalogProjectReference>], void>

Triggered when a new reference was removed.