Object/Class

scodec.protocols

TimeStamped

Related Docs: class TimeStamped | package protocols

Permalink

object TimeStamped extends Serializable

Source
TimeStamped.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TimeStamped
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

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. object Lenses

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def attemptReorderLocally[A](over: FiniteDuration): Process1[TimeStamped[A], TimeStamped[A]]

    Permalink

    Stream transducer that reorders timestamped values over a specified duration.

    Stream transducer that reorders timestamped values over a specified duration.

    Values are kept in an internal buffer. Upon receiving a new value, any buffered values that are timestamped with value.time - over are emitted. Other values, and the new value, are kept in the buffer.

    This is useful for ordering mostly ordered streams, where values may be out of order with close neighbors but are strictly less than values that come much later in the stream.

    An example of such a structure is the result of merging streams of values generated with TimeStamped.now.

    Caution: this transducer should only be used on streams that are mostly ordered. In the worst case, if the source is in reverse order, all values in the source will be accumulated in to the buffer until the source halts, and then the{ values will be emitted in order.

  7. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. def increasing[A]: Process1[TimeStamped[A], TimeStamped[A]]

    Permalink

    Stream transducer that filters the specified timestamped values to ensure the output time stamps are always increasing in time.

    Stream transducer that filters the specified timestamped values to ensure the output time stamps are always increasing in time. Other values are dropped.

  14. def increasingW[A]: Writer1[TimeStamped[A], TimeStamped[A], TimeStamped[A]]

    Permalink

    Stream transducer that filters the specified timestamped values to ensure the output time stamps are always increasing in time.

    Stream transducer that filters the specified timestamped values to ensure the output time stamps are always increasing in time. The increasing values are emitted as output of the writer, while out of order values are written to the writer side of the writer.

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def liftL[A, B, C](p: Process1[TimeStamped[A], TimeStamped[B]]): Process1[TimeStamped[\/[A, C]], TimeStamped[\/[B, C]]]

    Permalink

    TimeStamped version of scalaz.stream.process1.liftL.

  17. def liftR[A, B, C](p: Process1[TimeStamped[A], TimeStamped[B]]): Process1[TimeStamped[\/[C, A]], TimeStamped[\/[C, B]]]

    Permalink

    TimeStamped version of scalaz.stream.process1.liftR.

  18. implicit def monadInstance: Monad[TimeStamped]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  22. def now[A](a: A): TimeStamped[A]

    Permalink
  23. implicit def ordering[A](implicit A: Ordering[A]): Ordering[TimeStamped[A]]

    Permalink

    Orders values by timestamp, then by value.

  24. def perSecondRate[A, B](f: (A) ⇒ B)(implicit arg0: Monoid[B]): Process1[TimeStamped[A], TimeStamped[B]]

    Permalink

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B] where B is an accumulated feature of A over a second.

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B] where B is an accumulated feature of A over a second.

    For example, the emitted bits per second of a Process[Task, ByteVector] can be calculated using perSecondRate(_.size * 8), which yields a stream of the emitted bits per second.

    f

    function which extracts a feature of A

  25. def preserveTimeStamps[A, B](p: Process1[A, B]): Process1[TimeStamped[A], TimeStamped[B]]

    Permalink

    Combinator that converts a Process1[A, B] in to a Process1[TimeStamped[A], TimeStamped[B]] such that timestamps are preserved on elements that flow through the process.

  26. def rate[A, B](over: FiniteDuration)(f: (A) ⇒ B)(implicit arg0: Monoid[B]): Process1[TimeStamped[A], TimeStamped[B]]

    Permalink

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B] where B is an accumulated feature of A over a specified time period.

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B] where B is an accumulated feature of A over a specified time period.

    For example, the emitted bits per second of a Process[Task, ByteVector] can be calculated using rate(1.0)(_.size * 8), which yields a stream of the emitted bits per second.

    over

    time period over which to calculate

    f

    function which extracts a feature of A

  27. def reorderLocally[A](over: FiniteDuration): Process1[TimeStamped[A], TimeStamped[A]]

    Permalink

    Stream transducer that reorders a stream of timestamped values that are mostly ordered, using a time based buffer of the specified duration.

    Stream transducer that reorders a stream of timestamped values that are mostly ordered, using a time based buffer of the specified duration. See attemptReorderLocally for details.

    The resulting process is guaranteed to always emit values in time increasing order. Values may be dropped from the source process if they were not successfully reordered.

  28. def reorderLocallyW[A](over: FiniteDuration): Writer1[TimeStamped[A], TimeStamped[A], TimeStamped[A]]

    Permalink

    Stream transducer that reorders a stream of timestamped values that are mostly ordered, using a time based buffer of the specified duration.

    Stream transducer that reorders a stream of timestamped values that are mostly ordered, using a time based buffer of the specified duration. See attemptReorderLocally for details.

    The resulting process is guaranteed to always emit output values in time increasing order. Any values that could not be reordered due to insufficient buffer space are emitted on the writer (left) side.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def throttle[A](source: Process[Task, TimeStamped[A]], throttlingFactor: Double)(implicit S: Strategy, scheduler: ScheduledExecutorService): Process[Task, TimeStamped[A]]

    Permalink

    Returns a process that is the throttled version of the source process.

    Returns a process that is the throttled version of the source process.

    Given two adjacent items from the source process, a and b, where a is emitted first and b is emitted second, their time delta is b.time - a.time.

    This function creates a process that emits values at wall clock times such that the time delta between any two adjacent values is proportional to their time delta in the source process.

    The throttlingFactor is a scaling factor that determines how much source time a unit of wall clock time is worth. A value of 1.0 causes the output process to emit values spaced in wall clock time equal to their time deltas. A value of 2.0 emits values at twice the speed of wall clock time.

    This is particularly useful when timestamped data can be read in bulk (e.g., from a capture file) but should be "played back" at real time speeds.

  31. def timeBasedOrdering[A]: Ordering[TimeStamped[A]]

    Permalink

    Orders values by timestamp -- values with the same timestamp are considered equal.

  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. implicit def traverseInstance: Traverse[TimeStamped]

    Permalink
  34. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withPerSecondRate[A, B](f: (A) ⇒ B)(implicit arg0: Monoid[B]): Process1[TimeStamped[A], TimeStamped[\/[B, A]]]

    Permalink

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B \/ A] where B is an accumulated feature of A over a second.

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B \/ A] where B is an accumulated feature of A over a second.

    Every incoming A is echoed to the output.

    For example, the emitted bits per second of a Process[Task, ByteVector] can be calculated using perSecondRate(_.size * 8), which yields a stream of the emitted bits per second.

    f

    function which extracts a feature of A

  38. def withRate[A, B](over: FiniteDuration)(f: (A) ⇒ B)(implicit arg0: Monoid[B]): Process1[TimeStamped[A], TimeStamped[\/[B, A]]]

    Permalink

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B \/ A] where B is an accumulated feature of A over a specified time period.

    Stream transducer that converts a stream of TimeStamped[A] in to a stream of TimeStamped[B \/ A] where B is an accumulated feature of A over a specified time period.

    Every incoming A is echoed to the output.

    For example, the emitted bits per second of a Process[Task, ByteVector] can be calculated using rate(1.0)(_.size * 8), which yields a stream of the emitted bits per second.

    over

    time period over which to calculate

    f

    function which extracts a feature of A

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped