Just to follow up on this in case anyone runs into this thread - in Scala
the proper way to override the onUpdated() java method is:
class MyListener[K,V] extends CacheEntryUpdatedListener[K,V] {
def
onUpdated(events:java.lang.Iterable[javax.cache.event.CacheEntryEvent[_<:K,_<:V]])
{
events.foreach(x => println(s"${x.getKey},${x.getValue}")) //
replace with whatever you want
}
}
Took me some time to get the correct signature going.
Then you feed this to setLocalListener like this: setLocalListener(new
MyListener[<whatever is key type>,<whatever is value type>)
I am not sure how much coverage of the Java API us in the Scala API - it
did not look like much to me. In addition, wrapping everything into scalar
{} on the scala side did not seem terribly useful but maybe I am missing
something.
On Mon, Apr 20, 2015 at 12:08 PM, Ognen Duzlevski <
[hidden email]
> wrote: