Package com.mchange.v2.encounter
Class WeakEqualityEncounterCounter
java.lang.Object
com.mchange.v2.encounter.WeakEqualityEncounterCounter
- All Implemented Interfaces:
EncounterCounter
NOTE: Use of WeakEqualityEncounterCounter can't fully guarantee counts with equality semantics,
as an Object can be encounted garbage collected, then re-encountered with
no apparent history.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
WeakEqualityEncounterCounter
public WeakEqualityEncounterCounter()
-
-
Method Details
-
encounter
- Specified by:
encounter
in interfaceEncounterCounter
- Returns:
- how many times have I seen this object before?
-
reset
- 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
-