ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 胡永亮/Bob <hu...@neusoft.com>
Subject How to get all keys of cache most quickly?
Date Fri, 23 Sep 2016 08:00:46 GMT
Hi, everyone, 

    About this question, I search the mail list and Ignite java doc, but no suitable answer
was found.

    My use case is, I have a cache whose structure is IgniteCache<String, Map<Long,
    I want loop all entries to remove some entries in Map value.

    So, first, I want to get all keys, and according to key I will use EntryProcessor to handle
every Map value in remote server.

    If I get all keys like the following code snippet:
    IgniteCache<String, Map<Long, List<baselink>>>  mapMatchingData = IgniteManager.getInstance().getMapMatchingData();
    Iterator<Cache.Entry<String, Map<Long, List<baselink>>>>  it1
= mapMatchingData.iterator();
     Cache.Entry<String, Map<Long, List<baselink>>> cEntry = it1.next();
     String car_key = cEntry.getKey();

    If this, I have a worry: are the Map values got from remote server? If got, I think the
performache is bad.

    Wish to get a help, thanks.


Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies
your system. Thank you.
View raw message