Package com.mchange.v2.encounter
Class StrongEqualityEncounterCounter
- java.lang.Object
-
- com.mchange.v2.encounter.StrongEqualityEncounterCounter
-
- All Implemented Interfaces:
EncounterCounter
public class StrongEqualityEncounterCounter extends java.lang.Object
NOTE: Use of StrongEqualityEncounterCounter will maintain a reference to any Object it has encountered, leading potentially to memory leaks if it is resources are not reset.
-
-
Constructor Summary
Constructors Constructor Description StrongEqualityEncounterCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
encounter(java.lang.Object o)
long
reset(java.lang.Object o)
void
resetAll()
Remove all Object histories, resetting counts and clearing any references from strong counters.
-
-
-
Method Detail
-
encounter
public long encounter(java.lang.Object o)
- Specified by:
encounter
in interfaceEncounterCounter
- Returns:
- how many times have I seen this object before?
-
reset
public long reset(java.lang.Object o)
- Specified by:
reset
in interfaceEncounterCounter
- Returns:
- how many times have I seen this object before, then remove this Object's history, resetting its count and eliminating any reference from strong counters.
-
resetAll
public void resetAll()
Description copied from interface:EncounterCounter
Remove all Object histories, resetting counts and clearing any references from strong counters.- Specified by:
resetAll
in interfaceEncounterCounter
-
-