protected class ConcurrentReferenceHashMap.ReferenceManager extends Object
ConcurrentReferenceHashMap.Reference
s. This class can be overridden if
alternative reference types need to be supported.Modifier | Constructor and Description |
---|---|
protected |
ReferenceManager() |
Modifier and Type | Method and Description |
---|---|
ConcurrentReferenceHashMap.Reference<K,V> |
createReference(ConcurrentReferenceHashMap.Entry<K,V> entry,
int hash,
ConcurrentReferenceHashMap.Reference<K,V> next)
Factory method used to create a new
ConcurrentReferenceHashMap.Reference . |
ConcurrentReferenceHashMap.Reference<K,V> |
pollForPurge()
Return any reference that has been garbage collected and can be purged from the
underlying structure or
null if no references need purging. |
public ConcurrentReferenceHashMap.Reference<K,V> createReference(ConcurrentReferenceHashMap.Entry<K,V> entry, int hash, ConcurrentReferenceHashMap.Reference<K,V> next)
ConcurrentReferenceHashMap.Reference
.entry
- the entry contained in the referencehash
- the hashnext
- the next reference in the chain, or null
if noneConcurrentReferenceHashMap.Reference
public ConcurrentReferenceHashMap.Reference<K,V> pollForPurge()
null
if no references need purging. This
method must be thread safe and ideally should not block when returning
null
. References should be returned once and only once.null