abstract class RawStorage extends AnyRef
RawStorage
is responsible for taking an identifier and a Source
of bits and
persisting them. It's also responsible for retrieving those bits given the
same identifier.
Implementations need not concern themselves with concurrency matters. Concurrency
is handled by the Storage
class, which is the interface that consumers of the
storage mechanism interact with.
To implement, subclasses should extend this class and define clean
, source
, and
sink
methods.
- Alphabetic
- By Inheritance
- RawStorage
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new RawStorage()(implicit system: ActorSystem)
Abstract Value Members
- abstract def clean(key: String, id: UUID): Future[Done]
Removes any data for the given key and id.
Removes any data for the given key and id.
This operation must eventually succeed or fail.
- Attributes
- protected
- abstract def sink(key: String, id: UUID): Sink[ByteString, Future[Done]]
Provides a sink that
ByteString
instances can be sent to.Provides a sink that
ByteString
instances can be sent to. This stored data should be retrievable usingsource
with the same key and id.Implementations do not need to be concerned about concurrency.
This operation must eventually succeed or fail.
- Attributes
- protected
- abstract def source(key: String, id: UUID): Future[Option[Source[ByteString, NotUsed]]]
Provides a
Source
ofByteString
for the given key and id, or None if the given key/id hasn't been stored before.Provides a
Source
ofByteString
for the given key and id, or None if the given key/id hasn't been stored before.Implementations do not need to be concerned about concurrency.
This operation must eventually succeed or fail.
- Attributes
- protected
Concrete 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def load[A](stateCodec: StateCodec[A], namespace: String, id: UUID): Future[Option[A]]
Load a stored object of a specified type given its id.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def remove[A](stateCodec: StateCodec[A], namespace: String, id: UUID): Future[Done]
Remove a stored object of a specified type given its id.
Remove a stored object of a specified type given its id. This simply defers to the defined clean method.
- def save[A](stateCodec: StateCodec[A], namespace: String, id: UUID, instance: A): Future[Done]
Save a stored object of a specified type given its id and value.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()