Package com.mchange.v2.encounter
Class IdentityEncounterCounter
- java.lang.Object
-
- com.mchange.v2.encounter.IdentityEncounterCounter
-
- All Implemented Interfaces:
EncounterCounter
public class IdentityEncounterCounter extends java.lang.ObjectDeprecated.use WeakIdentityEncounterCounter (name changed to emphasize for library users that they need to understand whether implementations are weak or strong to avoid accidental reference retention in strong counters)
-
-
Constructor Summary
Constructors Constructor Description IdentityEncounterCounter()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longencounter(java.lang.Object o)longreset(java.lang.Object o)voidresetAll()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:
encounterin interfaceEncounterCounter- Returns:
- how many times have I seen this object before?
-
reset
public long reset(java.lang.Object o)
- Specified by:
resetin 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:EncounterCounterRemove all Object histories, resetting counts and clearing any references from strong counters.- Specified by:
resetAllin interfaceEncounterCounter
-
-