@Test public void testIncrementLong() { final String key = "key1"; registry.incrementLong(key, 2L); assertEquals(2L, registry.getNumber(key)); registry.incrementLong(key, 2L); assertEquals(4L, registry.getNumber(key)); }
@Override public final synchronized long incrementLong(final String key, final long amount) { long newValue = opt(key, 0L) + amount; put(key, newValue); return newValue; }
BasicRegistry implements Registry { @Override public final synchronized long incrementLong(final String key, final long amount) { long newValue = opt(key, 0L) + amount; put(key, newValue); return newValue; } }
BasicRegistry implements Registry { @Override public final synchronized long incrementLong(final String key, final long amount) { long newValue = opt(key, 0L) + amount; put(key, newValue); return newValue; }  }
BasicRegistry implements Registry { @Override public final synchronized long incrementLong(final String key, final long amount) { long newValue = opt(key, 0L) + amount; put(key, newValue); return newValue; }  final void setTimeToKeepAfterAccessInMinutes(final int timeToKeepAfterAccessInMinutes); @Override final long getTimeToKeepAfterAccessInMillis(); @Override void delete(final String key); @Override final synchronized boolean containsKey(final String key); @Override final synchronized void put(final String key, final URI value); @Override final synchronized long incrementLong(final String key, final long amount); @Override final synchronized int incrementInt(final String key, final int amount); @Override final synchronized URI getURI(final String key); @Override final synchronized void put(final String key, final String value); @Override final synchronized String getString(final String key); @Override final synchronized void put(final String key, final Number value); @Override final synchronized Number getNumber(final String key); @Override final synchronized T opt(final String key, final T defaultValue); @Override final synchronized void put(final String key, final JSONObject value); @Override final synchronized JSONObject getJSON(final String key); }
BasicRegistry implements Registry { @Override public final synchronized long incrementLong(final String key, final long amount) { long newValue = opt(key, 0L) + amount; put(key, newValue); return newValue; }  final void setTimeToKeepAfterAccessInMinutes(final int timeToKeepAfterAccessInMinutes); @Override final long getTimeToKeepAfterAccessInMillis(); @Override void delete(final String key); @Override final synchronized boolean containsKey(final String key); @Override final synchronized void put(final String key, final URI value); @Override final synchronized long incrementLong(final String key, final long amount); @Override final synchronized int incrementInt(final String key, final int amount); @Override final synchronized URI getURI(final String key); @Override final synchronized void put(final String key, final String value); @Override final synchronized String getString(final String key); @Override final synchronized void put(final String key, final Number value); @Override final synchronized Number getNumber(final String key); @Override final synchronized T opt(final String key, final T defaultValue); @Override final synchronized void put(final String key, final JSONObject value); @Override final synchronized JSONObject getJSON(final String key);  }