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 StorageService
storageService
-
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 void
activate()
void
deactivate()
java.util.Set<java.lang.String>
getProperties(java.lang.String componentName)
Returns set of component configuration property names.java.lang.String
getProperty(java.lang.String componentName, java.lang.String name)
Returns the string value of the given component configuration property.void
setProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)
Sets the value of the specified configuration property.void
setProperty(java.lang.String componentName, java.lang.String name, java.lang.String value, boolean override)
Sets the value of the specified configuration property.void
unsetProperty(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:ComponentConfigStore
Sets the value of the specified configuration property.- Specified by:
setProperty
in 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:ComponentConfigStore
Sets the value of the specified configuration property.- Specified by:
setProperty
in 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:ComponentConfigStore
Clears the value of the specified configuration property thus making the property take on its default value.- Specified by:
unsetProperty
in interfaceComponentConfigStore
- Parameters:
componentName
- component namename
- property name
-
getProperties
public java.util.Set<java.lang.String> getProperties(java.lang.String componentName)
Description copied from interface:ComponentConfigStore
Returns set of component configuration property names. This includes only the names of properties whose values depart from their default.- Specified by:
getProperties
in 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:ComponentConfigStore
Returns the string value of the given component configuration property. For properties whose values are set to their default this may return null.- Specified by:
getProperty
in interfaceComponentConfigStore
- Parameters:
componentName
- component namename
- property name; null if no property found or if value is default- Returns:
- set of property names
-
-