Package org.codelibs.fess.helper
Class CrawlerStatsHelper.StatsObject
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Long> SequencedMap<String,Long>
- Enclosing class:
CrawlerStatsHelper
Statistics data object that stores timestamped events and maintains reference counting.
Extends LinkedHashMap to store event names mapped to their timestamps.
Includes reference counting for multi-threaded access tracking.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtomicIntegerAtomic counter for tracking reference count across multiple threads. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new statistics object with the current timestamp as the begin time. -
Method Summary
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Field Details
-
count
Atomic counter for tracking reference count across multiple threads.
-
-
Constructor Details
-
StatsObject
public StatsObject()Creates a new statistics object with the current timestamp as the begin time. Initializes the reference count to 1.
-
-
Method Details
-
increment
public int increment()Increments the reference count for this statistics object.- Returns:
- the new reference count after incrementing
-
decrement
public int decrement()Decrements the reference count for this statistics object.- Returns:
- the new reference count after decrementing
-