Packages

class LocalFileRepository extends ComponentBase with FileRepository

A FileRepository which is using a local file system for storing files.

Note: File operations are not always synchronized. It tries to mimic a little bit of collision safety by writing new files to ".part" files and then rename it (which is atomic on most modern file systems). However it's possible to construct a clash in meta data overriding. In practice the risk should be small when used with a local user .

Temporary files are cleaned up periodically. This should scale to some 1000 files but not more.

Annotations
@Singleton()
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalFileRepository
  2. FileRepository
  3. ComponentBase
  4. AkkaHelper
  5. Component
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LocalFileRepository()(implicit akkaRuntime: AkkaRuntime)
    Annotations
    @Inject()
  2. new LocalFileRepository(directory: Path)(implicit akkaRuntime: AkkaRuntime)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. implicit def actorSystem: ActorSystem
    Attributes
    protected
    Definition Classes
    AkkaHelper
  5. def addShutdownHook(f: => Future[_]): Unit
    Attributes
    protected
    Definition Classes
    ComponentBase
  6. implicit val akkaRuntime: AkkaRuntime
    Attributes
    protected
    Definition Classes
    ComponentBase → Component
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. val cleanupInterval: FiniteDuration
  9. val cleanupTimeout: FiniteDuration
  10. def clock: Clock
    Attributes
    protected
    Definition Classes
    AkkaHelper
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  12. def config: Config
    Attributes
    protected
    Definition Classes
    AkkaHelper
  13. def copy(from: String, to: String): Future[Unit]

    Request copying a file.

    Request copying a file.

    Definition Classes
    LocalFileRepository → FileRepository
  14. def deleteFile(id: String): Future[Boolean]

    Delete a file.

    Delete a file. Returns true, if the file existed.

    Definition Classes
    LocalFileRepository → FileRepository
  15. val directory: Path
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. implicit def executionContext: ExecutionContext
    Attributes
    protected
    Definition Classes
    AkkaHelper
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def loadFile(id: String): Future[LoadFileResult]

    Request retrieval of a file.

    Request retrieval of a file.

    returns

    content type and file source

    Definition Classes
    LocalFileRepository → FileRepository
  23. final val logger: Logger
    Attributes
    protected
    Definition Classes
    ComponentBase
  24. implicit def materializer: Materializer
    Attributes
    protected
    Definition Classes
    AkkaHelper
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. def removeTimeoutedFiles(): Unit
  29. def requestFileGet(id: String, optimistic: Boolean): Future[FileGetResult]

    Request the loading of a file.

    Request the loading of a file.

    optimistic

    if true, the file handle will also be returned, if the file is not yet existant.

    Definition Classes
    LocalFileRepository → FileRepository
  30. def requestFileStorage(contentType: String, temporary: Boolean): Future[FileStorageResult]

    Request the storage of a new file.

    Request the storage of a new file.

    Definition Classes
    LocalFileRepository → FileRepository
  31. def storeFile(id: String): Future[Sink[ByteString, Future[Long]]]

    Request storing a file (must be requested at first).

    Request storing a file (must be requested at first).

    Definition Classes
    LocalFileRepository → FileRepository
  32. val subConfig: Config
    Attributes
    protected
  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from FileRepository

Inherited from ComponentBase

Inherited from AkkaHelper

Inherited from Component

Inherited from AnyRef

Inherited from Any

Ungrouped