public class InMemoryFieldValueCounterRepository extends Object implements FieldValueCounterRepository
| Constructor and Description |
|---|
InMemoryFieldValueCounterRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
decrement(String name,
String fieldName,
double score)
Decrement the FieldValueCounter for a given field name by score, creating missing counters.
|
FieldValueCounter |
findOne(String name)
Retrieve a single counter by name.
|
void |
increment(String name,
String fieldName,
double score)
Increment the FieldValueCounter for a given field name by score, creating missing counters.
|
Collection<String> |
list()
List the names of all available counters.
|
void |
reset(String name)
Reset the given FieldValueCounter.
|
public void increment(String name, String fieldName, double score)
FieldValueCounterWriterincrement in interface FieldValueCounterWritername - the FieldValueCounter namefieldName - the name of the fieldscore - the incremental valuepublic void decrement(String name, String fieldName, double score)
FieldValueCounterWriterdecrement in interface FieldValueCounterWritername - the FieldValueCounter namefieldName - the name of the fieldscore - the decremental valuepublic void reset(String name)
FieldValueCounterWriterreset in interface FieldValueCounterWritername - the FieldValueCounter namepublic FieldValueCounter findOne(String name)
FieldValueCounterReaderfindOne in interface FieldValueCounterReadername - the name of the counterpublic Collection<String> list()
FieldValueCounterReaderlist in interface FieldValueCounterReaderCopyright © 2016 Pivotal Software, Inc.. All rights reserved.