@Qualifier(value="simple") public class InMemoryCounterRepository extends AbstractInMemoryRepository<Counter,java.lang.String> implements CounterRepository
| Constructor and Description |
|---|
InMemoryCounterRepository() |
| Modifier and Type | Method and Description |
|---|---|
long |
decrement(java.lang.String name)
Decrement the given counter, creating it if it did not exist.
|
long |
increment(java.lang.String name)
Increment the given counter by one, creating it if it did not exist.
|
long |
increment(java.lang.String name,
long amount)
Increment the given counter by the specified amount, creating it if it did not exist.
|
protected java.lang.String |
keyFor(Counter entity) |
void |
reset(java.lang.String name)
Reset the given counter to zero.
|
buildMap, count, delete, delete, deleteAll, findAll, findAll, findAll, findAllInRange, findOne, save, slicedelete, exists, findAll, saveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindAll, findAllcount, delete, delete, delete, deleteAll, exists, findAll, findAll, findOne, save, savefindAllInRangepublic long increment(java.lang.String name)
CounterRepositoryincrement in interface CounterRepositorypublic long increment(java.lang.String name,
long amount)
CounterRepositoryincrement in interface CounterRepositorypublic long decrement(java.lang.String name)
CounterRepositorydecrement in interface CounterRepositorypublic void reset(java.lang.String name)
CounterRepositoryreset in interface CounterRepositoryprotected java.lang.String keyFor(Counter entity)
keyFor in class AbstractInMemoryRepository<Counter,java.lang.String>