【发布时间】:2021-02-08 14:03:04
【问题描述】:
我有一个 IMap,其中包含 String 键和 Foo 值对象。
IMap<String, String> mapTest1 = client.getMap("testMap");
Foo foo1 = new Foo();
Foo foo2 = new Foo();
Foo foo3 = new Foo();
Foo foo4 = new Foo();
mapTest1.put( "somePrefix1:abc:testKey1", foo1);
mapTest1.put( "somePrefix3:abc:testKey2", foo2);
mapTest1.put( "somePrefix4:def:testKey3", foo3);
mapTest1.put( "somePrefix5:def:testKey4", foo4);
当我将"abc" 作为输入时,我想在List 中获得foo1 和foo2。
当我将"somePrefix1" 和"abc" 作为输入时,我还只想在List 中获得foo1。
我怎样才能做到这一点?
【问题讨论】:
标签: hazelcast