c

com.spotify.scio.transforms

ScalaAsyncLookupDoFn

abstract class ScalaAsyncLookupDoFn[Input, Output, Client] extends BaseAsyncLookupDoFn[Input, Output, Client, Future[Output], Try[Output]] with ScalaFutureHandlers[Output]

A DoFn that performs asynchronous lookup using the provided client for Scala Future.

Input

input element type.

Output

client lookup value type.

Client

client type.

Source
ScalaAsyncLookupDoFn.scala
Linear Supertypes
ScalaFutureHandlers[Output], BaseAsyncLookupDoFn[Input, Output, Client, Future[Output], Try[Output]], Base[Future[Output], Output], DoFnWithResource[Input, KV[Input, Try[Output]], Pair[Client, Cache[Input, Output]]], DoFn[Input, KV[Input, Try[Output]]], HasDisplayData, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaAsyncLookupDoFn
  2. ScalaFutureHandlers
  3. BaseAsyncLookupDoFn
  4. Base
  5. DoFnWithResource
  6. DoFn
  7. HasDisplayData
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ScalaAsyncLookupDoFn(maxPendingRequests: Int, cacheSupplier: CacheSupplier[Input, Output])

    maxPendingRequests

    maximum number of pending requests on every cloned DoFn. This prevents runner from timing out and retrying bundles.

    cacheSupplier

    supplier for lookup cache.

  2. new ScalaAsyncLookupDoFn(maxPendingRequests: Int)

    maxPendingRequests

    maximum number of pending requests on every cloned DoFn. This prevents runner from timing out and retrying bundles.

  3. new ScalaAsyncLookupDoFn()
  4. new ScalaAsyncLookupDoFn(maxPendingRequests: Int, deduplicate: Boolean, cacheSupplier: CacheSupplier[Input, Output])

Type Members

  1. abstract class FinishBundleContext extends AnyRef
    Definition Classes
    DoFn
  2. abstract class OnTimerContext extends WindowedContext
    Definition Classes
    DoFn
  3. abstract class OnWindowExpirationContext extends WindowedContext
    Definition Classes
    DoFn
  4. abstract class ProcessContext extends WindowedContext
    Definition Classes
    DoFn
  5. abstract class StartBundleContext extends AnyRef
    Definition Classes
    DoFn
  6. abstract class WindowedContext extends AnyRef
    Definition Classes
    DoFn

Abstract Value Members

  1. abstract def asyncLookup(client: Client, input: Input): Future[Output]

    Perform asynchronous lookup.

    Perform asynchronous lookup.

    Definition Classes
    BaseAsyncLookupDoFn
  2. abstract def getResourceType(): ResourceType

    Get resource type.

    Get resource type.

    Definition Classes
    DoFnWithResource
  3. abstract def newClient(): Client

    Creates the client.

    Creates the client.

    Attributes
    protected[transforms]
    Definition Classes
    BaseAsyncLookupDoFn
  4. abstract object FinishBundleContext
    Definition Classes
    DoFn
  5. abstract object ProcessContext
    Definition Classes
    DoFn
  6. abstract object StartBundleContext
    Definition Classes
    DoFn
  7. abstract object WindowedContext
    Definition Classes
    DoFn

Concrete 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. def addCallback(future: Future[Output], onSuccess: Function[Output, Void], onFailure: Function[Throwable, Void]): Future[Output]
    Definition Classes
    ScalaFutureHandlers → Base
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def closeResource(resource: Pair[Client, Cache[Input, Output]]): Unit

    Close resource.

    Close resource.

    Default implementation closes AutoCloseable resource.

    Definition Classes
    BaseAsyncLookupDoFnDoFnWithResource
    Annotations
    @Override()
  8. def createResource(): Pair[Client, Cache[Input, Output]]

    Create resource.

    Create resource.

    DoFnWithResource#getResourceType() determines how many times this is called.

    Definition Classes
    BaseAsyncLookupDoFnDoFnWithResource
    Annotations
    @Override()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def failure(throwable: Throwable): Try[Output]

    Wrap output in a failed Try.

    Wrap output in a failed Try.

    Definition Classes
    ScalaAsyncLookupDoFnBaseAsyncLookupDoFn
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. def finishBundle(context: FinishBundleContext): Unit
    Definition Classes
    BaseAsyncLookupDoFn
    Annotations
    @FinishBundle()
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def getInputTypeDescriptor(): TypeDescriptor[Input]
    Definition Classes
    DoFn
  16. def getOutputTypeDescriptor(): TypeDescriptor[KV[Input, Try[Output]]]
    Definition Classes
    DoFn
  17. def getResource(): Pair[Client, Cache[Input, Output]]

    Get managed resource.

    Get managed resource.

    Definition Classes
    DoFnWithResource
    Annotations
    @SuppressWarnings()
  18. def getResourceCache(): Cache[Input, Output]
    Definition Classes
    BaseAsyncLookupDoFn
  19. def getResourceClient(): Client
    Definition Classes
    BaseAsyncLookupDoFn
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def populateDisplayData(builder: Builder): Unit
    Definition Classes
    DoFnWithResource → DoFn → HasDisplayData
    Annotations
    @Override()
  26. def processElement(input: Input, timestamp: Instant, window: BoundedWindow, pane: PaneInfo, out: OutputReceiver[KV[Input, Try[Output]]]): Unit
    Definition Classes
    BaseAsyncLookupDoFn
    Annotations
    @SuppressWarnings() @ProcessElement()
  27. def setup(): Unit
    Definition Classes
    DoFnWithResource
    Annotations
    @Setup()
  28. def startBundle(context: StartBundleContext): Unit
    Definition Classes
    BaseAsyncLookupDoFn
    Annotations
    @StartBundle()
  29. def success(output: Output): Try[Output]

    Wrap output in a successful Try.

    Wrap output in a successful Try.

    Definition Classes
    ScalaAsyncLookupDoFnBaseAsyncLookupDoFn
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def teardown(): Unit
    Definition Classes
    DoFnWithResource
    Annotations
    @Teardown()
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. def waitForFutures(futures: Iterable[Future[Output]]): Unit
    Definition Classes
    ScalaFutureHandlers → Base

Deprecated Value Members

  1. def getAllowedTimestampSkew(): Duration
    Definition Classes
    DoFn
    Annotations
    @Deprecated
    Deprecated
  2. final def prepareForProcessing(): Unit
    Definition Classes
    DoFn
    Annotations
    @Deprecated
    Deprecated
  3. def processElement(input: Input, timestamp: Instant, out: OutputReceiver[KV[Input, Try[Output]]], window: BoundedWindow): Unit
    Definition Classes
    BaseAsyncLookupDoFn
    Annotations
    @Deprecated
    Deprecated

Inherited from ScalaFutureHandlers[Output]

Inherited from BaseAsyncLookupDoFn[Input, Output, Client, Future[Output], Try[Output]]

Inherited from Base[Future[Output], Output]

Inherited from DoFnWithResource[Input, KV[Input, Try[Output]], Pair[Client, Cache[Input, Output]]]

Inherited from DoFn[Input, KV[Input, Try[Output]]]

Inherited from HasDisplayData

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped