molecule.channel

NativeProducer

abstract class NativeProducer[-A] extends AnyRef

A NativeProducer interfaces permits to produce messages in a blocking manner from a native thread. This interface is typically used to wrap a cooperative system-level output channel interface into an interface that can be manipulated easily from a native Java thread.

It is also common to wrap a Buffer channel of a sufficient large size inside this interface to produce messages asynchronously and in a non-blocking manner from a cooperative process. This works as long as the maximum number buffer size required in order to not block is guaranteed by the application protocol (i.e. request-ack).

A

the type of the messages carried by this channel.

Source
NativeProducer.scala
See also

ConsumerInterface to receive messages from an external thread.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. NativeProducer
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NativeProducer()

Abstract Value Members

  1. abstract def close(signal: Signal): Unit

    Close the channel.

    Close the channel.

    signal

    the signal indicating why the channel is closed

  2. abstract def isClosed: Option[Signal]

    Check if the channel is closed.

    Check if the channel is closed.

    returns

    Some signal if the channel is closed

  3. abstract def send(seg: Seg[A], sigOpt: Option[Signal]): Unit

    Send a segment accompanied by an optional termination signal.

    Send a segment accompanied by an optional termination signal.

    seg

    the segment

    sigOpt

    the optional termination signal

    Exceptions thrown
    SignalException

    if the channel is poisoned. The segment will be poisoned.

Concrete 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. def clone(): AnyRef

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

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

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

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

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

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

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  17. def send(seg: Seg[A], signal: Signal): Unit

    Send the last segment.

    Send the last segment.

    signal

    the signal indicating why the channel is closed

    Exceptions thrown
    SignalException

    if the channel is poisoned. In this case, the message will be poisoned.

  18. def send(a: A, signal: Signal): Unit

    Send the last message.

    Send the last message.

    a

    the message

    signal

    the signal indicating why the channel is closed

    Exceptions thrown
    SignalException

    if the channel is poisoned. In this case, the message will be poisoned.

  19. def send(seg: Seg[A]): Unit

    Send a segment

    Send a segment

    seg

    the segment

    Exceptions thrown
    SignalException

    if the channel is poisoned. The message will be poisoned.

  20. def send(a: A): Unit

    Send a message

    Send a message

    a

    the message

    Exceptions thrown
    SignalException

    if the channel is poisoned. The message will be poisoned.

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

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any