SaveAction

class SaveAction(fileManager: FileManager, failureHandler: (ErrorCode, Throwable?) -> Unit) : FileAction

SaveAction is a FileAction that forces a save of an AvailFile to disk outside of the normal save mechanism.

Author

Richard Arriaga

Parameters

failureHandler

A function that accepts a ErrorCode that describes the nature of the failure and an optional Throwable.

Constructors

Link copied to clipboard
constructor(fileManager: FileManager, failureHandler: (ErrorCode, Throwable?) -> Unit)

Construct a SaveAction.

Properties

Link copied to clipboard
open val isTraced: Boolean

true indicates this FileAction is traced in a TracedAction; false otherwise.

Link copied to clipboard
open override val type: FileActionType

The FileActionType that represents this FileAction.

Functions

Link copied to clipboard
open override fun execute(file: AvailFile, timestamp: Long, originator: UUID): TracedAction

Executes the action on the provided AvailFile and answer the TracedAction required to reverse this FileAction update.