Java interface for use with the Spark API