Packages

final case class DropOldAndSignal[A](bufferSize: Int, onOverflow: (Long) ⇒ Option[A]) extends Evicted[A] with Product with Serializable

A OverflowStrategy specifying that on reaching the maximum size, the currently buffered events should start being dropped in a FIFO order, so the oldest events from the buffer will be dropped first.

The given onOverflow function get be used for logging the event and for sending a message to the downstream consumers to inform them of dropped messages. The function can return None in which case no message is sent and thus you can use it just to log a warning.

bufferSize

specifies how many events our buffer can hold before overflowing

onOverflow

is a function that can get called on overflow with a number of messages that were dropped, a function that builds a new message that will be sent to downstream. If it returns None, then no message gets sent to downstream.

Source
OverflowStrategy.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DropOldAndSignal
  2. Product
  3. Equals
  4. Evicted
  5. Synchronous
  6. OverflowStrategy
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DropOldAndSignal(bufferSize: Int, onOverflow: (Long) ⇒ Option[A])

    bufferSize

    specifies how many events our buffer can hold before overflowing

    onOverflow

    is a function that can get called on overflow with a number of messages that were dropped, a function that builds a new message that will be sent to downstream. If it returns None, then no message gets sent to downstream.

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val bufferSize: Int
    Definition Classes
    DropOldAndSignalEvicted
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. val isEvicted: Boolean
    Definition Classes
    EvictedOverflowStrategy
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. val isSynchronous: Boolean
    Definition Classes
    SynchronousOverflowStrategy
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. val onOverflow: (Long) ⇒ Option[A]
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from Evicted[A]

Inherited from Synchronous[A]

Inherited from OverflowStrategy[A]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped