oleg-vlsk commented on code in PR #11793: URL: https://github.com/apache/ignite/pull/11793#discussion_r1912379357
########## modules/core/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsThinClientTest.java: ########## @@ -199,6 +210,36 @@ private void checkCacheOperation(OperationType op, Consumer<ClientCache<Object, assertEquals(1, ops.get()); } + /** + * Cache {@link TcpClientCache#putAllConflict} operation perfomed + * @param map {@link Map} with entries for cache put all. + * @return cache {@link Consumer<ClientCache>}. + */ + private Consumer<ClientCache<Object, Object>> putAllConflict(Map<Integer, Object> map) { + Map<Integer, T3<Object, GridCacheVersion, Long>> drMap = new HashMap<>(); + + GridCacheVersion confl = new GridCacheVersion(1, 0, 1, (byte)2); + + map.forEach((key, value) -> drMap.put(key, new T3<>(value, confl, CU.EXPIRE_TIME_ETERNAL))); + + return cache -> ((TcpClientCache<Object, Object>)cache).putAllConflict(drMap); + } + + /** + * Cache {@link TcpClientCache#putAllConflict} operation perfomed + * @param keys {@link Set} with keys for cache remove all. + * @return cache {@link Consumer<ClientCache>}. + */ + private Consumer<ClientCache<Object, Object>> removeAllConflict(Set<Integer> keys) { + Map<Integer, GridCacheVersion> drMap = new HashMap<>(); + + GridCacheVersion confl = new GridCacheVersion(1, 0, 1, (byte)2); + + keys.forEach(key -> drMap.put(key, confl)); Review Comment: Maybe `Map<Integer, GridCacheVersion> drMap = F.asMap(F.first(keys), confl);`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org