/** * This does a single entry insert. If the key already exists then an exception is thrown. * * @param k * @param v */ public void insert(K k, V v) { WXSMapMBeanImpl mbean = WXSUtils.getWXSMapMBeanManager().getBean(grid, mapName); long start = System.nanoTime(); try { tls.getMap(mapName).insert(k, v); mbean.getInsertMetrics().logTime(System.nanoTime() - start); } catch (Exception e) { mbean.getInsertMetrics().logException(e); throw new ObjectGridRuntimeException(e); } }
/** * Parallel insert all the entries. This does a real insert, not a put (get/update) * * @param batch */ public void insertAll(Map<K, V> batch) { WXSMapMBeanImpl mbean = WXSUtils.getWXSMapMBeanManager().getBean(grid, mapName); long start = System.nanoTime(); utils.insertAll(batch, bmap); mbean.getInsertMetrics().logTime(System.nanoTime() - start); }