@Override public void run() { int counter = 0; while (!stop) { try { cache.put("key-" + counter, "" + cache.getAdvancedCache().getRpcManager().getAddress() + "-" + counter); } catch (Exception e) { log.warnf("Error inserting key into the cache", e); } counter++; try { Thread.sleep(1000); } catch (InterruptedException e) { break; } } } };