Package org.onosproject.store.cfg
Class DistributedComponentConfigStore
- java.lang.Object
-
- org.onosproject.store.AbstractStore<ComponentConfigEvent,ComponentConfigStoreDelegate>
-
- org.onosproject.store.cfg.DistributedComponentConfigStore
-
- All Implemented Interfaces:
ComponentConfigStore,Store<ComponentConfigEvent,ComponentConfigStoreDelegate>
public class DistributedComponentConfigStore extends AbstractStore<ComponentConfigEvent,ComponentConfigStoreDelegate> implements ComponentConfigStore
Manages inventory of component configurations in a distributed data store that provides strong sequential consistency guarantees.
-
-
Field Summary
Fields Modifier and Type Field Description protected StorageServicestorageService-
Fields inherited from class org.onosproject.store.AbstractStore
delegate
-
-
Constructor Summary
Constructors Constructor Description DistributedComponentConfigStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voiddeactivate()java.util.Set<java.lang.String>getProperties(java.lang.String componentName)Returns set of component configuration property names.java.lang.StringgetProperty(java.lang.String componentName, java.lang.String name)Returns the string value of the given component configuration property.voidsetProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)Sets the value of the specified configuration property.voidsetProperty(java.lang.String componentName, java.lang.String name, java.lang.String value, boolean override)Sets the value of the specified configuration property.voidunsetProperty(java.lang.String componentName, java.lang.String name)Clears the value of the specified configuration property thus making the property take on its default value.-
Methods inherited from class org.onosproject.store.AbstractStore
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.store.Store
hasDelegate, setDelegate, unsetDelegate
-
-
-
-
Field Detail
-
storageService
protected StorageService storageService
-
-
Method Detail
-
activate
public void activate()
-
deactivate
public void deactivate()
-
setProperty
public void setProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)Description copied from interface:ComponentConfigStoreSets the value of the specified configuration property.- Specified by:
setPropertyin interfaceComponentConfigStore- Parameters:
componentName- component namename- property namevalue- new property value
-
setProperty
public void setProperty(java.lang.String componentName, java.lang.String name, java.lang.String value, boolean override)Description copied from interface:ComponentConfigStoreSets the value of the specified configuration property.- Specified by:
setPropertyin interfaceComponentConfigStore- Parameters:
componentName- component namename- property namevalue- new property valueoverride- true to override even if the property has been set to other value
-
unsetProperty
public void unsetProperty(java.lang.String componentName, java.lang.String name)Description copied from interface:ComponentConfigStoreClears the value of the specified configuration property thus making the property take on its default value.- Specified by:
unsetPropertyin interfaceComponentConfigStore- Parameters:
componentName- component namename- property name
-
getProperties
public java.util.Set<java.lang.String> getProperties(java.lang.String componentName)
Description copied from interface:ComponentConfigStoreReturns set of component configuration property names. This includes only the names of properties whose values depart from their default.- Specified by:
getPropertiesin interfaceComponentConfigStore- Parameters:
componentName- component name- Returns:
- set of property names whose values are set to non-default values
-
getProperty
public java.lang.String getProperty(java.lang.String componentName, java.lang.String name)Description copied from interface:ComponentConfigStoreReturns the string value of the given component configuration property. For properties whose values are set to their default this may return null.- Specified by:
getPropertyin interfaceComponentConfigStore- Parameters:
componentName- component namename- property name; null if no property found or if value is default- Returns:
- set of property names
-
-