c

com.spotify.scio.transforms

BaseAsyncLookupDoFn

abstract class BaseAsyncLookupDoFn[Input, Output, Client, Future, TryWrapper] extends DoFnWithResource[Input, KV[Input, TryWrapper], Pair[Client, Cache[Input, Output]]] with Base[Future, Output]

A DoFn that performs asynchronous lookup using the provided client. Lookup requests may be deduplicated.

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

Instance Constructors

  1. new BaseAsyncLookupDoFn(maxPendingRequests: Int, deduplicate: Boolean, cacheSupplier: CacheSupplier[Input, Output])

    Create a BaseAsyncLookupDoFn instance.

    Create a BaseAsyncLookupDoFn instance.

    maxPendingRequests

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

    deduplicate

    if an attempt should be made to de-duplicate simultaneous requests for the same input

    cacheSupplier

    supplier for lookup cache.

  2. new BaseAsyncLookupDoFn(maxPendingRequests: Int, cacheSupplier: CacheSupplier[Input, Output])

    Create a BaseAsyncLookupDoFn instance.

    Create a BaseAsyncLookupDoFn instance. Simultaneous requests for the same input may be de-duplicated.

    maxPendingRequests

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

    cacheSupplier

    supplier for lookup cache.

  3. new BaseAsyncLookupDoFn(maxPendingRequests: Int)

    Create a BaseAsyncLookupDoFn instance.

    Create a BaseAsyncLookupDoFn instance. Simultaneous requests for the same input may be de-duplicated.

    maxPendingRequests

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

  4. new BaseAsyncLookupDoFn()

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 addCallback(future: Future, onSuccess: Function[Output, Void], onFailure: Function[Throwable, Void]): Future
    Definition Classes
    Base
  2. abstract def asyncLookup(client: Client, input: Input): Future

    Perform asynchronous lookup.

  3. abstract def failure(throwable: Throwable): TryWrapper

    Wrap output in a failed Try.

  4. abstract def getResourceType(): ResourceType

    Get resource type.

    Get resource type.

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

    Creates the client.

    Creates the client.

    Attributes
    protected[transforms]
  6. abstract def success(output: Output): TryWrapper

    Wrap output in a successful Try.

  7. abstract def waitForFutures(futures: Iterable[Future]): Unit
    Definition Classes
    Base
  8. abstract object FinishBundleContext
    Definition Classes
    DoFn
  9. abstract object ProcessContext
    Definition Classes
    DoFn
  10. abstract object StartBundleContext
    Definition Classes
    DoFn
  11. 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def closeResource(resource: Pair[Client, Cache[Input, Output]]): Unit

    Close resource.

    Close resource.

    Default implementation closes AutoCloseable resource.

    Definition Classes
    BaseAsyncLookupDoFnDoFnWithResource
    Annotations
    @Override()
  7. 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()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. def finishBundle(context: FinishBundleContext): Unit
    Annotations
    @FinishBundle()
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getInputTypeDescriptor(): TypeDescriptor[Input]
    Definition Classes
    DoFn
  14. def getOutputTypeDescriptor(): TypeDescriptor[KV[Input, TryWrapper]]
    Definition Classes
    DoFn
  15. def getResource(): Pair[Client, Cache[Input, Output]]

    Get managed resource.

    Get managed resource.

    Definition Classes
    DoFnWithResource
    Annotations
    @SuppressWarnings()
  16. def getResourceCache(): Cache[Input, Output]
  17. def getResourceClient(): Client
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def populateDisplayData(builder: Builder): Unit
    Definition Classes
    DoFnWithResource → DoFn → HasDisplayData
    Annotations
    @Override()
  24. def processElement(input: Input, timestamp: Instant, window: BoundedWindow, pane: PaneInfo, out: OutputReceiver[KV[Input, TryWrapper]]): Unit
    Annotations
    @SuppressWarnings() @ProcessElement()
  25. def setup(): Unit
    Definition Classes
    DoFnWithResource
    Annotations
    @Setup()
  26. def startBundle(context: StartBundleContext): Unit
    Annotations
    @StartBundle()
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def teardown(): Unit
    Definition Classes
    DoFnWithResource
    Annotations
    @Teardown()
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

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, TryWrapper]], window: BoundedWindow): Unit
    Annotations
    @Deprecated
    Deprecated

Inherited from Base[Future, Output]

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

Inherited from DoFn[Input, KV[Input, TryWrapper]]

Inherited from HasDisplayData

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped