class GrpcBatchDoFn[Input, BatchRequest, BatchResponse, Output, Client <: AbstractFutureStub[Client]] extends GuavaAsyncBatchLookupDoFn[Input, BatchRequest, BatchResponse, Output, Client]
DoFn that makes API calls that can be batched and individually cached over a managed GRPC channel.
- Source
- GrpcBatchDoFn.java
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- GrpcBatchDoFn
- GuavaAsyncBatchLookupDoFn
- Guava
- BaseAsyncBatchLookupDoFn
- Base
- DoFnWithResource
- DoFn
- HasDisplayData
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new GrpcBatchDoFn(channelSupplier: ChannelSupplier, newClientFn: SerializableFunction[Channel, Client], batchSize: Int, batchRequestFn: SerializableFunction[List[Input], BatchRequest], batchResponseFn: SerializableFunction[BatchResponse, List[Pair[String, Output]]], idExtractorFn: SerializableFunction[Input, String], lookupFn: SerializableBiFunction[Client, BatchRequest, ListenableFuture[BatchResponse]], maxPendingRequests: Int, cacheSupplier: CacheSupplier[String, Output])
- new GrpcBatchDoFn(channelSupplier: ChannelSupplier, newClientFn: SerializableFunction[Channel, Client], batchSize: Int, batchRequestFn: SerializableFunction[List[Input], BatchRequest], batchResponseFn: SerializableFunction[BatchResponse, List[Pair[String, Output]]], idExtractorFn: SerializableFunction[Input, String], lookupFn: SerializableBiFunction[Client, BatchRequest, ListenableFuture[BatchResponse]], maxPendingRequests: Int)
Type Members
- abstract class FinishBundleContext extends AnyRef
- Definition Classes
- DoFn
- abstract class OnTimerContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class OnWindowExpirationContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class ProcessContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class StartBundleContext extends AnyRef
- Definition Classes
- DoFn
- abstract class WindowedContext extends AnyRef
- Definition Classes
- DoFn
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addCallback(future: ListenableFuture[BatchResponse], onSuccess: Function[BatchResponse, Void], onFailure: Function[Throwable, Void]): ListenableFuture[BatchResponse]
- Definition Classes
- Guava → Base
- Annotations
- @Override()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asyncLookup(client: Client, request: BatchRequest): ListenableFuture[BatchResponse]
- Definition Classes
- GrpcBatchDoFn → BaseAsyncBatchLookupDoFn
- Annotations
- @Override()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def closeResource(resource: Pair[Client, Cache[String, Output]]): Unit
Close resource.
Close resource.
Default implementation closes
AutoCloseable
resource.- Definition Classes
- BaseAsyncBatchLookupDoFn → DoFnWithResource
- Annotations
- @Override()
- def createResource(): Pair[Client, Cache[String, Output]]
Create resource.
Create resource.
DoFnWithResource#getResourceType()
determines how many times this is called.- Definition Classes
- BaseAsyncBatchLookupDoFn → DoFnWithResource
- Annotations
- @Override()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def failure(throwable: Throwable): Try[Output]
- Definition Classes
- GuavaAsyncBatchLookupDoFn → BaseAsyncBatchLookupDoFn
- Annotations
- @Override()
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def finishBundle(context: FinishBundleContext): Unit
- Definition Classes
- BaseAsyncBatchLookupDoFn
- Annotations
- @FinishBundle()
- def getCallbackExecutor(): Executor
Executor used for callbacks.
Executor used for callbacks. Default is
ForkJoinPool#commonPool()
. Consider overriding this method if callbacks are blocking.- returns
Executor for callbacks.
- Definition Classes
- Guava
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getInputTypeDescriptor(): TypeDescriptor[Input]
- Definition Classes
- DoFn
- def getOutputTypeDescriptor(): TypeDescriptor[KV[Input, Try[Output]]]
- Definition Classes
- DoFn
- def getResource(): Pair[Client, Cache[String, Output]]
Get managed resource.
Get managed resource.
- Definition Classes
- DoFnWithResource
- Annotations
- @SuppressWarnings()
- def getResourceCache(): Cache[String, Output]
- Definition Classes
- BaseAsyncBatchLookupDoFn
- def getResourceClient(): Client
- Definition Classes
- BaseAsyncBatchLookupDoFn
- def getResourceType(): ResourceType
Get resource type.
Get resource type.
- Definition Classes
- GrpcBatchDoFn → DoFnWithResource
- Annotations
- @Override()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newClient(): Client
- Attributes
- protected[grpc]
- Definition Classes
- GrpcBatchDoFn → BaseAsyncBatchLookupDoFn
- Annotations
- @Override()
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def populateDisplayData(builder: Builder): Unit
- Definition Classes
- DoFnWithResource → DoFn → HasDisplayData
- Annotations
- @Override()
- def processElement(input: Input, timestamp: Instant, window: BoundedWindow, pane: PaneInfo, out: OutputReceiver[KV[Input, Try[Output]]]): Unit
- Definition Classes
- BaseAsyncBatchLookupDoFn
- Annotations
- @ProcessElement()
- def setup(): Unit
- Definition Classes
- DoFnWithResource
- Annotations
- @Setup()
- def startBundle(context: StartBundleContext): Unit
- Definition Classes
- BaseAsyncBatchLookupDoFn
- Annotations
- @StartBundle()
- def success(output: Output): Try[Output]
- Definition Classes
- GuavaAsyncBatchLookupDoFn → BaseAsyncBatchLookupDoFn
- Annotations
- @Override()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def teardown(): Unit
- Definition Classes
- DoFnWithResource
- Annotations
- @Teardown()
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def waitForFutures(futures: Iterable[ListenableFuture[BatchResponse]]): Unit
- Definition Classes
- Guava → Base
- Annotations
- @Override()
Deprecated Value Members
- def getAllowedTimestampSkew(): Duration
- Definition Classes
- DoFn
- Annotations
- @Deprecated
- Deprecated
- final def prepareForProcessing(): Unit
- Definition Classes
- DoFn
- Annotations
- @Deprecated
- Deprecated
- def processElement(input: Input, timestamp: Instant, out: OutputReceiver[KV[Input, Try[Output]]], window: BoundedWindow): Unit
- Definition Classes
- BaseAsyncBatchLookupDoFn
- Annotations
- @Deprecated
- Deprecated