Class CounterManagerImpl
- java.lang.Object
-
- com.evolveum.midpoint.repo.cache.counters.CounterManagerImpl
-
- All Implemented Interfaces:
CounterManager
@Component public class CounterManagerImpl extends Object implements CounterManager
An implementation of CounterManager. Keeps track of counters used e.g. to implement policy rules thresholds. Note that this class resides in repo-cache module almost by accident and perhaps should be moved to a more appropriate place.- Author:
- katka
-
-
Constructor Summary
Constructors Constructor Description CounterManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanupCounters(String taskOid)
CounterSpecification
getCounterSpec(String taskId, String policyRuleId, PolicyRuleType policyRule)
This method must be synchronized because of a race condition between getting from countersMap and inserting entries to it.Collection<CounterSpecification>
listCounters()
void
removeCounter(CounterSpecification counterSpecification)
void
resetCounters(String taskOid)
-
-
-
Method Detail
-
cleanupCounters
public void cleanupCounters(String taskOid)
- Specified by:
cleanupCounters
in interfaceCounterManager
-
resetCounters
public void resetCounters(String taskOid)
- Specified by:
resetCounters
in interfaceCounterManager
-
getCounterSpec
public CounterSpecification getCounterSpec(String taskId, String policyRuleId, PolicyRuleType policyRule)
This method must be synchronized because of a race condition between getting from countersMap and inserting entries to it.- Specified by:
getCounterSpec
in interfaceCounterManager
-
listCounters
public Collection<CounterSpecification> listCounters()
- Specified by:
listCounters
in interfaceCounterManager
-
removeCounter
public void removeCounter(CounterSpecification counterSpecification)
- Specified by:
removeCounter
in interfaceCounterManager
-
-