or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

async-operations.mddata-sources.mdfunction-interfaces.mdindex.mdkeyed-streams.mdoutput-operations.mdscala-extensions.mdstream-composition.mdstream-environment.mdstream-partitioning.mdstream-transformations.mdwindow-operations.mdwindowing.md
tile.json

function-interfaces.mddocs/

Function Interfaces and User-Defined Functions

Type-safe interfaces for implementing custom processing logic including window functions, process functions, and rich functions with lifecycle management.

Window Function Interfaces

trait WindowFunction[IN, OUT, KEY, W <: Window] {
  def apply(key: KEY, window: W, input: Iterable[IN], out: Collector[OUT]): Unit
}

abstract class ProcessWindowFunction[IN, OUT, KEY, W <: Window] {
  def process(key: KEY, context: Context, elements: Iterable[IN], out: Collector[OUT]): Unit
  def clear(context: Context): Unit
}

trait AllWindowFunction[IN, OUT, W <: Window] {
  def apply(window: W, input: Iterable[IN], out: Collector[OUT]): Unit
}

Rich Function Interfaces

abstract class RichWindowFunction[IN, OUT, KEY, W <: Window] extends WindowFunction[IN, OUT, KEY, W]
abstract class RichProcessWindowFunction[IN, OUT, KEY, W <: Window] extends ProcessWindowFunction[IN, OUT, KEY, W]
abstract class RichAllWindowFunction[IN, OUT, W <: Window] extends AllWindowFunction[IN, OUT, W]

Async Function Interface

trait AsyncFunction[IN, OUT] {
  def asyncInvoke(input: IN, collector: AsyncCollector[OUT]): Unit
}

Function interfaces provide type-safe contracts for implementing custom processing logic with access to runtime context, state, and timers.