Class IdentityEncounterCounter

  • All Implemented Interfaces:
    EncounterCounter

    public class IdentityEncounterCounter
    extends java.lang.Object
    Deprecated.
    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)
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdentityEncounterCounter

        public IdentityEncounterCounter()
        Deprecated.
    • Method Detail

      • encounter

        public long encounter​(java.lang.Object o)
        Specified by:
        encounter in interface EncounterCounter
        Returns:
        how many times have I seen this object before?
      • reset

        public long reset​(java.lang.Object o)
        Specified by:
        reset in interface EncounterCounter
        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 interface EncounterCounter