InMemoryCachedDistributedMetaStorageBridge { public void iterate( String globalKeyPrefix, BiConsumer<String, ? super Serializable> cb ) throws IgniteCheckedException { for (Map.Entry<String, byte[]> entry : cache.tailMap(globalKeyPrefix).entrySet()) { if (!entry.getKey().startsWith(globalKeyPrefix)) break; cb.accept(entry.getKey(), unmarshal(marshaller, entry.getValue())); } } InMemoryCachedDistributedMetaStorageBridge(JdkMarshaller marshaller); Serializable read(String globalKey); byte[] readMarshalled(String globalKey); void iterate(
        String globalKeyPrefix,
        BiConsumer<String, ? super Serializable> cb
    ); void write(String globalKey, @Nullable byte[] valBytes); DistributedMetaStorageKeyValuePair[] localFullData(); void writeFullNodeData(DistributedMetaStorageClusterNodeData fullNodeData); DistributedMetaStorageVersion readInitialData(
        ReadOnlyMetastorage metastorage
    );  }
@Test public void testIterate() throws Exception { bridge.write("key3", marshaller.marshal("val3")); bridge.write("key1", marshaller.marshal("val1")); bridge.write("key2", marshaller.marshal("val2")); bridge.write("xey4", marshaller.marshal("val4")); List<String> keys = new ArrayList<>(); List<String> values = new ArrayList<>(); bridge.iterate("key", (key, value) -> { assertThat(value, is(instanceOf(String.class))); keys.add(key); values.add((String)value); }); assertEquals(asList("key1", "key2", "key3"), keys); assertEquals(asList("val1", "val2", "val3"), values); }