ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Setrakyan <dsetrak...@apache.org>
Subject java8 and serializable
Date Mon, 23 Feb 2015 07:28:02 GMT
Hello Ignite experts,

I just noticed that EntryProcessor does not implement Serializable, which
makes it impossible to serialize when used in Java8 lambda notations.

However, what if we define IgniteEntryProcessor which extends both,
EntryProcessor and Serializable? And also add invoke method on IgniteCache
which accepts IgniteEntryProcessor, like so:
----------------
*@IgniteAsyncSupported*
*public <T> T invoke(K key, IgniteEntryProcessor<K, V, T> entryProcessor,
Object... arguments);*


*@IgniteAsyncSupported*
*@Override public <T> T invoke(K key, EntryProcessor<K, V, T>
entryProcessor, Object... arguments);*
------------------

Does anyone know which method will be invoked when used with Java8 lambdas
without any casting, like so (is it JDK specific?):
-------------------
*cache.invoke("mykey", (entry, args) -> { .... }); *
-------------------

D.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message