Closed asubb closed 4 years ago
A little investigation how it can be serialized for topology, however it should appear under the exactly same name
import kotlin.reflect.jvm.jvmName
val func: (Long) -> Long = { it * 2 }
println(func(2))
// outputs 4
val funcClass = func::class
val funcClassAsString = funcClass.jvmName
println(funcClassAsString)
// outputs class name
val clazz = Class.forName(funcClassAsString)
val funcByName = clazz.newInstance() as (Any) -> Any
println(funcByName(2))
// outputs 4
Implementation will be common with https://github.com/asubb/wavebeans/issues/16
Implemented in https://github.com/asubb/wavebeans/pull/19
User should be able to define the functions that will be applied on the stream, the aim of this function is to modify the content stream in a custom way
API examples
On sample stream
On windowed sample stream
Alter function signature:
(T) -> T