You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Shawn Du <sh...@neulion.com.cn> on 2017/02/06 07:39:24 UTC

答复: persist only on delete

Hi,

 

In delete method, we can only get cache key.  In order to get cache entry
value, we need get Ignite instance and get the cache.

 

Assume we already get all of them. Can we get value in the cache by the key?
Which is still valid in cache?

 

Thanks

Shawn

 

发件人: Shawn Du [mailto:shawn.du@neulion.com.cn] 
发送时间: 2017年2月6日 15:12
收件人: user@ignite.apache.org
主题: persist only on delete 

 

Hi,

 

I have a case which cache entry will be update frequently, and I only want
to persist it when the cache is manually remove(cache will not change
anymore) by me.

 

For this case, It is a good idea to implement persist logic in
delete/deleteAll method while write/writeAll do nothing?

 

@Override
public void delete(Object o)
{
    //do nothing, we never have this operation.
}

 

 

Thanks

Shawn


Re: 答复: persist only on delete

Posted by Vladislav Pyatkov <vl...@gmail.com>.
Hi,

I think it will be work, because each time when "get"  from a cache Ignite
try to get the value from persistence story, if it will not find in memory.

On Mon, Feb 6, 2017 at 10:39 AM, Shawn Du <sh...@neulion.com.cn> wrote:

> Hi,
>
>
>
> In delete method, we can only get cache key.  In order to get cache entry
> value, we need get Ignite instance and get the cache.
>
>
>
> Assume we already get all of them. Can we get value in the cache by the
> key? Which is still valid in cache?
>
>
>
> Thanks
>
> Shawn
>
>
>
> *发件人:* Shawn Du [mailto:shawn.du@neulion.com.cn]
> *发送时间:* 2017年2月6日 15:12
> *收件人:* user@ignite.apache.org
> *主题:* persist only on delete
>
>
>
> Hi,
>
>
>
> I have a case which cache entry will be update frequently, and I only want
> to persist it when the cache is manually remove(cache will not change
> anymore) by me.
>
>
>
> For this case, It is a good idea to implement persist logic in
> delete/deleteAll method while write/writeAll do nothing?
>
>
>
> @Override
> public void delete(Object o)
> {
>     //do nothing, we never have this operation.
> }
>
>
>
>
>
> Thanks
>
> Shawn
>



-- 
Vladislav Pyatkov