Class/Object

agora.io.dao.instances

FileTimestampDao

Related Docs: object FileTimestampDao | package instances

Permalink

case class FileTimestampDao[T](rootDir: Path)(implicit saveValue: Persist[T], fromBytes: FromBytes[T], idFor: HasId[T]) extends TimestampDao[T] with Product with Serializable

Writes stuff (T values) down under the given directory structures:

<dir>/dates/<date>/<hour>/<minute>/<second>_<nano>_<id> = *data*

where *data* is determined by the given Persist, which is either the data itself or a linked file.

The implicit Persist may only link to the former instead of serializing the data

T

the value to save/retrieve

rootDir

the directory under which all the data will be stored

saveValue

the Persist instance to use in saving (or linking) the data.

fromBytes

a means of deserializing a T from bytes

idFor

the ability to name the T values w/ an ID (as multiple Ts can exist for the same instant)

Linear Supertypes
Serializable, Serializable, Product, Equals, TimestampDao[T], TimestampReader[T], TimestampWriter[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileTimestampDao
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TimestampDao
  7. TimestampReader
  8. TimestampWriter
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileTimestampDao(rootDir: Path)(implicit saveValue: Persist[T], fromBytes: FromBytes[T], idFor: HasId[T])

    Permalink

    rootDir

    the directory under which all the data will be stored

    saveValue

    the Persist instance to use in saving (or linking) the data.

    fromBytes

    a means of deserializing a T from bytes

    idFor

    the ability to name the T values w/ an ID (as multiple Ts can exist for the same instant)

Type Members

  1. type Id = String

    Permalink
  2. type RemoveResult = Path

    Permalink
    Definition Classes
    FileTimestampDaoTimestampWriter
  3. type SaveResult = Path

    Permalink
    Definition Classes
    FileTimestampDaoTimestampWriter

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  8. final def find(from: Timestamp, to: Timestamp): Iterator[T]

    Permalink
  9. def find(range: TimeRange): Iterator[T]

    Permalink

    With the directory structure:

    With the directory structure:

    <date>/


    //__ we can know to include *all* the subdirectories or if we have to filter them

    Definition Classes
    FileTimestampDaoTimestampReader
  10. def findIds(range: TimeRange): Iterator[String]

    Permalink
  11. def first(): Option[Timestamp]

    Permalink

    returns

    The first timestamp stored, if any

    Definition Classes
    FileTimestampDaoTimestampReader
  12. def firstId: Option[String]

    Permalink
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def last(): Option[Timestamp]

    Permalink

    returns

    The last timestamp stored, if any

    Definition Classes
    FileTimestampDaoTimestampReader
  16. def lastId: Option[String]

    Permalink
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def remove(data: T, timestamp: Timestamp): Path

    Permalink
    Definition Classes
    FileTimestampDaoTimestampWriter
  21. def removeBefore(timestamp: Timestamp): Array[Path]

    Permalink
  22. val rootDir: Path

    Permalink

    the directory under which all the data will be stored

  23. def save(data: T, timestamp: Timestamp): Path

    Permalink
    Definition Classes
    FileTimestampDaoTimestampWriter
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TimestampDao[T]

Inherited from TimestampReader[T]

Inherited from TimestampWriter[T]

Inherited from AnyRef

Inherited from Any

Ungrouped