Several extensions to the XAP API have been introduced to provide a more natural way of combining Scala with XAP.
Constructor based properties
The com.gigaspaces.annotation.pojo.SpaceClassConstructor annotation on a constructor will cause the data class properties analysis to be based on properties found in the constructor (instead of getters/setters).
A wrapper around the XAP API provides some sugaring on top of the GigaSpace#execute methods.
Predicate based queries
Support for predicate based queries on the GigaSpace proxy has been added in. This support is based on the new macros feature introduced in Scala.
Dynamic Language Tasks have been extended and now support Scala based script execution.
Following is a short demo of what can be done with the XAP scala shell. It should be noted that this shell is a regular Scala REPL with some initial imports and initialization code.
Example project that shows how XAP Scala can be used in a real project and how Scala and Java code might be integrated.
The Scala version required in order to use the Scala XAP extension is 2.11.6.
Assuming there is a scala installation under $SCALA_HOME, the jars under $SCALA_HOME/lib should be copied to $GS_HOME/lib/optional/scala/lib.