jetbrains.buildServer.serverSide.statistics
Interface ValueProviderRegistry

All Known Implementing Classes:
ValueProviderRegistry.Adapter

public interface ValueProviderRegistry

ValueProvider registry


Nested Class Summary
static class ValueProviderRegistry.Adapter
           
 
Method Summary
 ValueProvider getValueProvider(java.lang.String key)
          Returns registered ValueProvider
 java.util.Collection<ValueProvider> getValueProviders()
           
 ValueProvider registerAlias(ValueProvider valueProvider, java.lang.String key)
           
 ValueProvider registerorFindValueProvider(ValueProvider valueProvider)
          Registers a value provider, if there is no value provider with given valueProvider.getKey
 void registerValueProvider(ValueProvider valueProvider)
          Registers a value provider
 void unregisterValueProvider(ValueProvider valueProvider)
          Unregisters a value provider.
 

Method Detail

getValueProvider

@Nullable
ValueProvider getValueProvider(@NotNull
                                        java.lang.String key)
Returns registered ValueProvider

Parameters:
key - to lookup
Returns:
found registered ValueType
See Also:
ValueProvider.getKey()

registerValueProvider

void registerValueProvider(@NotNull
                           ValueProvider valueProvider)
Registers a value provider

Parameters:
valueProvider - metric value provider
Throws:
java.lang.IllegalArgumentException - if trying register a value provider with the same key

registerorFindValueProvider

ValueProvider registerorFindValueProvider(@NotNull
                                          ValueProvider valueProvider)
Registers a value provider, if there is no value provider with given valueProvider.getKey

Parameters:
valueProvider - value provider
Returns:
registered value provider or existing, previously registered value provider with given key

registerAlias

ValueProvider registerAlias(@NotNull
                            ValueProvider valueProvider,
                            @NotNull
                            java.lang.String key)

unregisterValueProvider

void unregisterValueProvider(@NotNull
                             ValueProvider valueProvider)
Unregisters a value provider. If not registered, does nothing

Parameters:
valueProvider - to unregister

getValueProviders

@NotNull
java.util.Collection<ValueProvider> getValueProviders()
Returns:
collection of all registered value providers in the system