ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Tupitsyn <ptupit...@apache.org>
Subject Re: cache update from .NET client to Java cluster
Date Mon, 20 Mar 2017 04:51:52 GMT
Yes, existing entry will be updated.

On Mon, Mar 20, 2017 at 1:07 AM, kfeerick <
kevin.feerick@ninemilefinancial.com> wrote:

> Thanks Pavel,
> Perhaps some crossed wires here. Let me rephrase my question.
>
> In my code example should I expect cache.Put(entry.Key, row) on my .NET
> process running in client mode to update an existing entry or create a new
> entry?
>
> /1:            var cache = Ignite.GetOrCreateCache<Key, Value>("my-cache");
> 2:            var query = new SqlQuery(typeof(Value), "Id=?") {Arguments =
> new[] {id}};
> 3:            var cursor = cache.Query(query);
> 4:            var entry = cursor.First();
> 5:            var row = entry.Value;
> 6:            row.Text = "ignite me";
> 7:            row.LastUpdatedStamp = DateTime.Now;
> 8:            cache.Put(entry.Key, row); /
>
>
> Even with serialisation of the key both ways my expectation is that the key
> value passed back in cache.Put() (line 8) would be equivalent to the key in
> the cache already as Ignite passed me that exact key from the result of my
> query (line 4).
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/cache-update-from-NET-client-to-
> Java-cluster-tp11217p11297.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message