Package io.debezium.util
Class BoundedConcurrentHashMap.NullEvictionPolicy<K,V>
java.lang.Object
io.debezium.util.BoundedConcurrentHashMap.NullEvictionPolicy<K,V>
- All Implemented Interfaces:
BoundedConcurrentHashMap.EvictionPolicy<K,V>
- Enclosing class:
- BoundedConcurrentHashMap<K,
V>
static class BoundedConcurrentHashMap.NullEvictionPolicy<K,V>
extends Object
implements BoundedConcurrentHashMap.EvictionPolicy<K,V>
-
Field Summary
Fields inherited from interface io.debezium.util.BoundedConcurrentHashMap.EvictionPolicy
MAX_BATCH_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Invoked to notify EvictionPolicy implementation that all Segment entries have been cleared.createNewEntry(K key, int hash, BoundedConcurrentHashMap.HashEntry<K, V> next, V value) execute()Invokes eviction policy algorithm and returns set of evicted entries.booleanInvoked to notify EvictionPolicy implementation that an entry in Segment has been accessed.Invoked to notify EvictionPolicy implementation that there has been an attempt to access an entry in Segment, however that entry was not present in Segment.voidInvoked to notify EvictionPolicy implementation that an entry e has been removed from Segment.strategy()Returns type of eviction algorithm (strategy).booleanReturns true if batching threshold has expired, false otherwise.
-
Constructor Details
-
NullEvictionPolicy
NullEvictionPolicy()
-
-
Method Details
-
clear
public void clear()Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyInvoked to notify EvictionPolicy implementation that all Segment entries have been cleared.- Specified by:
clearin interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V>
-
execute
Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyInvokes eviction policy algorithm and returns set of evicted entries. Set cannot be null but could possibly be an empty set.- Specified by:
executein interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V> - Returns:
- set of evicted entries.
-
onEntryHit
Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyInvoked to notify EvictionPolicy implementation that an entry in Segment has been accessed. Returns true if batching threshold has been reached, false otherwise. Note that this method is potentially invoked without holding a lock on Segment.- Specified by:
onEntryHitin interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V> - Parameters:
e- accessed entry in Segment- Returns:
- true if batching threshold has been reached, false otherwise.
-
onEntryMiss
public Set<BoundedConcurrentHashMap.HashEntry<K,V>> onEntryMiss(BoundedConcurrentHashMap.HashEntry<K, V> e) Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyInvoked to notify EvictionPolicy implementation that there has been an attempt to access an entry in Segment, however that entry was not present in Segment.- Specified by:
onEntryMissin interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V> - Parameters:
e- accessed entry in Segment- Returns:
- non null set of evicted entries.
-
onEntryRemove
Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyInvoked to notify EvictionPolicy implementation that an entry e has been removed from Segment.- Specified by:
onEntryRemovein interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V> - Parameters:
e- removed entry in Segment
-
thresholdExpired
public boolean thresholdExpired()Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyReturns true if batching threshold has expired, false otherwise. Note that this method is potentially invoked without holding a lock on Segment.- Specified by:
thresholdExpiredin interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V> - Returns:
- true if batching threshold has expired, false otherwise.
-
strategy
Description copied from interface:BoundedConcurrentHashMap.EvictionPolicyReturns type of eviction algorithm (strategy).- Specified by:
strategyin interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V> - Returns:
- type of eviction algorithm
-
createNewEntry
public BoundedConcurrentHashMap.HashEntry<K,V> createNewEntry(K key, int hash, BoundedConcurrentHashMap.HashEntry<K, V> next, V value) - Specified by:
createNewEntryin interfaceBoundedConcurrentHashMap.EvictionPolicy<K,V>
-