searching by key is not supported, and searching by a part of the key is not supported either. You can only retrieve entries by knowing the exact key. Or you can also search for values based on their fields.
A possible workaround for you is to put that part of the key in the value as a field and search for it.
Thanks, I decided to try and use the entrySet().stream to filter out key that contains the partial key. however having trouble as it throws unsupported exception.
I have a RemoteCache<Object,Object> cache;
Tried the following:
cache.keySet().stream().filter(e -> e.toString().contains("hello")).forEach(e -> log.info(e.toString()));
cache.entrySet().stream().filter(e -> e.toString().contains("hello")).forEach(e -> log.info(e.toString()));
Get this exception: java.lang.UnsupportedOperationException: null
Exceptions have stacktraces...