Package com.google.inject.internal
Class WeakKeySet
java.lang.Object
com.google.inject.internal.WeakKeySet
Minimal set that doesn't hold strong references to the contained keys.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.cache.Cache<State,
Set<WeakKeySet.KeyAndSource>> Tracks child injector lifetimes and evicts blacklisted keys/sources after the child injector is garbage collected.private final Object
This is already locked externally on add and getSources but we need it to handle clean up in the evictionCache's RemovalListener. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
cleanupOnRemoval
(com.google.common.cache.RemovalNotification<State, Set<WeakKeySet.KeyAndSource>> notification) boolean
getSources
(Key<?> key)
-
Field Details
-
backingMap
-
lock
This is already locked externally on add and getSources but we need it to handle clean up in the evictionCache's RemovalListener. -
evictionCache
Tracks child injector lifetimes and evicts blacklisted keys/sources after the child injector is garbage collected.
-
-
Constructor Details
-
WeakKeySet
WeakKeySet(Object lock)
-
-
Method Details
-
cleanupOnRemoval
private void cleanupOnRemoval(com.google.common.cache.RemovalNotification<State, Set<WeakKeySet.KeyAndSource>> notification) -
add
-
contains
-
getSources
-