kafka.utils

NetworkClientBlockingOps

final class NetworkClientBlockingOps extends AnyVal

Provides extension methods for NetworkClient that are useful for implementing blocking behaviour. Use with care.

Example usage:

val networkClient: NetworkClient = ...
import NetworkClientBlockingOps._
networkClient.blockingReady(...)
Linear Supertypes
AnyVal, NotNull, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. NetworkClientBlockingOps
  2. AnyVal
  3. NotNull
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NetworkClientBlockingOps(client: NetworkClient)

Value Members

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

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

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

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

    Definition Classes
    Any
  5. def blockingReady(node: Node, timeout: Long)(implicit time: org.apache.kafka.common.utils.Time): Boolean

    Invokes client.ready followed by 0 or more client.poll invocations until the connection to node is ready, the timeout expires or the connection fails.

    Invokes client.ready followed by 0 or more client.poll invocations until the connection to node is ready, the timeout expires or the connection fails.

    It returns true if the call completes normally or false if the timeout expires. If the connection fails, an IOException is thrown instead.

    This method is useful for implementing blocking behaviour on top of the non-blocking NetworkClient, use it with care.

  6. def blockingSendAndReceive(request: ClientRequest, timeout: Long)(implicit time: org.apache.kafka.common.utils.Time): Option[ClientResponse]

    Invokes client.send followed by 1 or more client.poll invocations until a response is received, the timeout expires or a disconnection happens.

    Invokes client.send followed by 1 or more client.poll invocations until a response is received, the timeout expires or a disconnection happens.

    It returns true if the call completes normally or false if the timeout expires. In the case of a disconnection, an IOException is thrown instead.

    This method is useful for implementing blocking behaviour on top of the non-blocking NetworkClient, use it with care.

  7. val client: NetworkClient

  8. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  10. def toString(): String

    Definition Classes
    Any

Inherited from AnyVal

Inherited from NotNull

Inherited from Any

Ungrouped