Class PrivateInternals_DynamicMapImpl<T>
java.lang.Object
com.google.gerrit.extensions.registration.DynamicMap<T>
com.google.gerrit.extensions.registration.PrivateInternals_DynamicMapImpl<T>
DO NOT USE
-
Method Summary
Modifier and TypeMethodDescriptionStore one new element that may be hot-replaceable in the future.Store one new element into the map.Methods inherited from class com.google.gerrit.extensions.registration.DynamicMap
byPlugin, emptyMap, get, iterator, mapOf, mapOf, plugins
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
put
public RegistrationHandle put(String pluginName, String exportName, com.google.inject.Provider<T> item) Store one new element into the map.- Parameters:
pluginName
- unique name of the plugin providing the export.exportName
- name the plugin has exported the item as.item
- the item to add to the collection. Must not be null.- Returns:
- handle to remove the item at a later point in time.
-
put
public ReloadableRegistrationHandle<T> put(String pluginName, com.google.inject.Key<T> key, com.google.inject.Provider<T> item) Store one new element that may be hot-replaceable in the future.- Parameters:
pluginName
- unique name of the plugin providing the export.key
- unique description from the item's Guice binding. This can be later obtained from the registration handle to facilitate matching with the new equivalent instance during a hot reload. The key must use anExport
annotation.item
- the item to add to the collection right now. Must not be null.- Returns:
- a handle that can remove this item later, or hot-swap the item without it ever leaving the collection.
-