Java-engine¶
This plugin allows execution of Java code on streamed data.
Java API¶
The Java code can access the Object input data passed to the resource.
The Java code should define a function named 'process' that takes the Object input data and returns the output data. Code can be specific about output data type.
public class MyProc {
public static String process(Object input) {
return String.valueOf(input).toUpperCase();
}
}
.configureResource(JavaResourceConfigBuilder.builder()
)
resource:
java-engine:
Java dependency management¶
Add this declaration to your dependency management system to access the configuration DSL for this plugin in Java.
<dependency>
<groupId>org.voltdb</groupId>
<artifactId>volt-stream-plugin-java-api</artifactId>
<version>1.7.0</version>
</dependency>
implementation group: 'org.voltdb', name: 'volt-stream-plugin-java-api', version: '1.7.0'
JSON Schema¶
You can validate or explore the configuration using its JSON Schema.