Basically, data streamer does the same thing as cache.Put() in a loop.
Data streamer is more efficient on large amounts of keys.

1) Yes, I guess there is no different than using tables
2) Data streamer performs batched updates. IDataStreamer.PerNodeBufferSize
controls how many entries are batched before being sent to remote nodes.
3) Once the streaming is complete (IDataStreamer.Flush() or
IDataStreamer.Close(false)), all data is guaranteed to be in the cache. So
you can do cache.Get.

On Tue, May 30, 2017 at 2:49 PM, Chetan D <ccheta...@gmail.com> wrote:

> Hi Pavel,
>
> Thank you for the quick response.
> I tried using data streamer to get all the values in a table and store it
> in cache. while i was doing that i came across a situation where in i need
> to store data to cache from SQL VIEWS.
>
> 1.Is it possible to load cache from sql views?
> 2.with respect to data streamer, when i use AddData() method will it add
> data to cache which i specified while creating data streamer  or the data
> will be stored in data streamer itself?
> 3. when i use data streamer  can i use the same way such as cache.get()
> method or by using a foreach loop to get cache or is it different with
> respect to datastreamer?
>
>
> Regards
> Chetan D
>
>
>
>
> On Mon, May 29, 2017 at 6:45 PM, Pavel Tupitsyn <ptupit...@apache.org>
> wrote:
>
>> 1) ICache implements IEnumerable, so you can do `foreach (var entry in
>> cache)` or `cache.ToList()`.
>> 2) To bulk load the data into cache you can either use IDataStreamer [1]
>> or, in case with cache store, ICacheStore.LoadCache method.
>> 3) No, you have to handle this manually.
>> 4) GetAll returns multiple cache entries by a set of known keys.
>>
>> [1] https://apacheignite-net.readme.io/docs/data-streamers
>>
>> On Mon, May 29, 2017 at 3:28 PM, Chetan D <ccheta...@gmail.com> wrote:
>>
>>> Hi Pavel,
>>>
>>> Thanks for the quick response. code helped me a lot.
>>> I have some general questions,
>>>
>>> 1.is it possible to get all data stored in cache without calling
>>> explicit get method if so how?
>>> 2.can i fetch all data from sql table and store it in cache without
>>> using any of the loops such as for each.
>>> 3.if i add any data in table will my cache gets updated automatically?
>>> 4.how can i make use of GetAll() method? will this fetch all cache data?
>>>
>>> Regards
>>> Chetan D
>>>
>>> On Fri, May 26, 2017 at 10:36 PM, Pavel Tupitsyn <ptupit...@apache.org>
>>> wrote:
>>>
>>>> Short writeup with example code, inspired by user questions:
>>>>
>>>> ADO.NET + Binary Mode Cache Store
>>>> https://ptupitsyn.github.io/Ado-Net-Cache-Store/
>>>>
>>>>
>>>
>>
>

Reply via email to