monix.reactive.OverflowStrategy

DropOldAndSignal

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.

Linear Supertypes
Product, Equals, Evicted[A], Synchronous[A], OverflowStrategy[A], Serializable, Serializable, AnyRef, Any
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
Learn more about member selection
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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val bufferSize: Int

    specifies how many events our buffer can hold before overflowing

    specifies how many events our buffer can hold before overflowing

    Definition Classes
    DropOldAndSignalEvicted
  8. def clone(): AnyRef

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

    Definition Classes
    AnyRef
  10. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  12. val isEvicted: Boolean

    Definition Classes
    EvictedOverflowStrategy
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. val isSynchronous: Boolean

    Definition Classes
    SynchronousOverflowStrategy
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. val onOverflow: (Long) ⇒ Option[A]

    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.

    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.

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

    Definition Classes
    AnyRef
  20. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @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