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()
- Alphabetic
- By Inheritance
- LocalFileRepository
- FileRepository
- ComponentBase
- AkkaHelper
- Component
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
LocalFileRepository()(implicit akkaRuntime: AkkaRuntime)
- Annotations
- @Inject()
- new LocalFileRepository(directory: Path)(implicit akkaRuntime: AkkaRuntime)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
def
actorSystem: ActorSystem
- Attributes
- protected
- Definition Classes
- AkkaHelper
-
def
addShutdownHook(f: ⇒ Future[_]): Unit
- Attributes
- protected
- Definition Classes
- ComponentBase
-
implicit
val
akkaRuntime: AkkaRuntime
- Attributes
- protected
- Definition Classes
- ComponentBase → Component
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val cleanupInterval: FiniteDuration
- val cleanupTimeout: FiniteDuration
-
def
clock: Clock
- Attributes
- protected
- Definition Classes
- AkkaHelper
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
config: Config
- Attributes
- protected
- Definition Classes
- AkkaHelper
-
def
copy(from: String, to: String): Future[Unit]
Request copying a file.
Request copying a file.
- Definition Classes
- LocalFileRepository → FileRepository
-
def
deleteFile(id: String): Future[Boolean]
Delete a file.
Delete a file. Returns true, if the file existed.
- Definition Classes
- LocalFileRepository → FileRepository
- val directory: Path
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
def
executionContext: ExecutionContext
- Attributes
- protected
- Definition Classes
- AkkaHelper
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
-
final
val
logger: Logger
- Attributes
- protected
- Definition Classes
- ComponentBase
-
implicit
def
materializer: Materializer
- Attributes
- protected
- Definition Classes
- AkkaHelper
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def removeTimeoutedFiles(): Unit
-
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
-
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
-
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
-
val
subConfig: Config
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )