Package com.google.gerrit.server.config
Class ConfigUpdatedEvent
- java.lang.Object
-
- com.google.gerrit.server.config.ConfigUpdatedEvent
-
public class ConfigUpdatedEvent extends Object
This event is produced byGerritServerConfigReloader
and forwarded to callers implementingGerritConfigListener
.The event intends to:
1. Help the callers figure out if any action should be taken, depending on which entries are updated in gerrit.config.
2. Provide the callers with a mechanism to accept/reject the entries of interest: @see accept(Set
entries), @see accept(String section), @see reject(Set entries) (+ various overloaded versions of these)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigUpdatedEvent.ConfigEntryType
static class
ConfigUpdatedEvent.ConfigUpdateEntry
static class
ConfigUpdatedEvent.UpdateResult
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.ImmutableMultimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry>
NO_UPDATES
-
Constructor Summary
Constructors Constructor Description ConfigUpdatedEvent(org.eclipse.jgit.lib.Config oldConfig, org.eclipse.jgit.lib.Config newConfig)
-
Method Summary
-
-
-
Field Detail
-
NO_UPDATES
public static final com.google.common.collect.ImmutableMultimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> NO_UPDATES
-
-
Method Detail
-
getOldConfig
public org.eclipse.jgit.lib.Config getOldConfig()
-
getNewConfig
public org.eclipse.jgit.lib.Config getNewConfig()
-
accept
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> accept(ConfigKey entry)
-
accept
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> accept(Set<ConfigKey> entries)
-
accept
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> accept(String section)
-
reject
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> reject(ConfigKey entry)
-
reject
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> reject(Set<ConfigKey> entries)
-
isSectionUpdated
public boolean isSectionUpdated(String section)
-
isValueUpdated
public boolean isValueUpdated(ConfigKey key)
-
-