从 Java 瘦客户端获取 Apache Ignite 缓存中的所有密钥

Getting All keys from Apache Ignite cache from Java Thin client

Now i am using apache ignite 2.8.0.

  public void run(){  

        for(int i=0;i<100000;i++)
        {
         c.put(i,s);  
        }}

I was put all the values by above code, now i want to get all the keys in that cache, how can i get all the keys from java thin client?

你可以使用Scan Query to do that. Scan the whole cache or on per partition basis. There's a documentation on using queries with thin client (it mostly concerns SQL, should work with ScanQuery来)。

最简单的应该是 cache.query(new ScanQuery()).getAll(); // Returns a collection of key-value pairs.