public class JMXNotifierConfigRegistry extends Object implements ConfigRegistryImplMXBean, AutoCloseable
Modifier and Type | Class and Description |
---|---|
static interface |
JMXNotifierConfigRegistry.NotifierMXBean |
static class |
JMXNotifierConfigRegistry.NotifierMXBeanImpl |
OBJECT_NAME, OBJECT_NAME_NO_NOTIFICATIONS
Constructor and Description |
---|
JMXNotifierConfigRegistry(ConfigRegistryImplMXBean delegate,
MBeanServer beanServer) |
Modifier and Type | Method and Description |
---|---|
ObjectName |
beginConfig()
Opens new configuration transaction.
|
void |
checkConfigBeanExists(ObjectName objectName)
Check that object name corresponds with existing module.
|
void |
checkServiceReferenceExists(ObjectName objectName) |
void |
close() |
CommitStatus |
commitConfig(ObjectName transactionControllerON)
Verifies and commits transaction.
|
Set<String> |
getAvailableModuleFactoryQNames()
Get the qNames of all ModuleFactory instances in the system.
|
Set<String> |
getAvailableModuleNames()
Get the module names available in the system.
|
List<ObjectName> |
getOpenConfigs()
List of open configuration transactions.
|
String |
getServiceInterfaceName(String namespace,
String localName)
Get the name of the service interface.
|
Map<String,Map<String,ObjectName>> |
getServiceMapping()
Get mapping of services to reference names and module object names.
|
ObjectName |
getServiceReference(String serviceInterfaceQName,
String refName)
Get the reference to that service.
|
long |
getVersion()
Get the version of last committed transaction that is now used as base
version.
|
boolean |
isHealthy()
Will return true unless there was a transaction that succeeded during
validation but failed in second phase of commit.
|
ObjectName |
lookupConfigBean(String moduleName,
String instanceName)
Find read module.
|
ObjectName |
lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName,
String refName)
Lookup object name by fully qualified service interface name and service
reference name.
|
Set<ObjectName> |
lookupConfigBeans()
Find all modules.
|
Set<ObjectName> |
lookupConfigBeans(String moduleName)
Find modules with given module name.
|
Set<ObjectName> |
lookupConfigBeans(String moduleName,
String instanceName)
Find read modules.
|
Set<ObjectName> |
lookupRuntimeBeans()
Find all runtime beans.
|
Set<ObjectName> |
lookupRuntimeBeans(String moduleName,
String instanceName)
Find all runtime of specified module.
|
Set<String> |
lookupServiceInterfaceNames(ObjectName objectName)
Find all available service interface names of a module.
|
Map<String,ObjectName> |
lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName)
Get current mapping between reference names and module object names for given
service interface name.
|
public JMXNotifierConfigRegistry(ConfigRegistryImplMXBean delegate, MBeanServer beanServer)
public long getVersion()
ConfigRegistryImplMXBean
getVersion
in interface ConfigRegistryImplMXBean
public ObjectName beginConfig()
ConfigRegistry
beginConfig
in interface ConfigRegistry
ObjectName
of
ConfigTransactionControllerMXBean
public CommitStatus commitConfig(ObjectName transactionControllerON) throws ConflictingVersionException, ValidationException
ConfigRegistry
commitConfig
in interface ConfigRegistry
transactionControllerON
- ObjectName
of
ConfigTransactionControllerMXBean
that was received in ConfigRegistry.beginConfig()
method call.ConflictingVersionException
- if configuration state was changedValidationException
- if validation failspublic List<ObjectName> getOpenConfigs()
ConfigRegistry
getOpenConfigs
in interface ConfigRegistry
public boolean isHealthy()
ConfigRegistry
isHealthy
in interface ConfigRegistry
public Set<String> getAvailableModuleNames()
ConfigRegistry
getAvailableModuleNames
in interface ConfigRegistry
public Set<ObjectName> lookupConfigBeans()
LookupRegistry
lookupConfigBeans
in interface LookupRegistry
public Set<ObjectName> lookupConfigBeans(String moduleName)
LookupRegistry
lookupConfigBeans
in interface LookupRegistry
moduleName
- name of modulepublic Set<ObjectName> lookupConfigBeans(String moduleName, String instanceName)
LookupRegistry
lookupConfigBeans
in interface LookupRegistry
moduleName
- exact match for searched module name, can contain '*' to match all
values.instanceName
- exact match for searched instance name, can contain '*' to match
all values.public ObjectName lookupConfigBean(String moduleName, String instanceName) throws InstanceNotFoundException
LookupRegistry
lookupConfigBean
in interface LookupRegistry
moduleName
- exact match for searched module name, can contain '*' to match all
values.instanceName
- exact match for searched instance name, can contain '*' to match
all values.InstanceNotFoundException
- if search did not find exactly one instancepublic void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException
LookupRegistry
checkConfigBeanExists
in interface LookupRegistry
InstanceNotFoundException
- if search did not find exactly one instancepublic Set<String> getAvailableModuleFactoryQNames()
LookupRegistry
getAvailableModuleFactoryQNames
in interface LookupRegistry
public Set<ObjectName> lookupRuntimeBeans()
LookupRegistry
lookupRuntimeBeans
in interface LookupRegistry
public Set<ObjectName> lookupRuntimeBeans(String moduleName, String instanceName)
LookupRegistry
lookupRuntimeBeans
in interface LookupRegistry
moduleName
- of beaninstanceName
- of beanpublic ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName)
ServiceReferenceReadableRegistry
lookupConfigBeanByServiceInterfaceName
in interface ServiceReferenceReadableRegistry
serviceInterfaceQName
- service interface namerefName
- service reference name supplied in
.api .ConfigTransactionController#saveServiceReference(String, String, javax.management.ObjectName)
public Map<String,Map<String,ObjectName>> getServiceMapping()
ServiceReferenceReadableRegistry
getServiceMapping
in interface ServiceReferenceReadableRegistry
public Map<String,ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName)
ServiceReferenceReadableRegistry
lookupServiceReferencesByServiceInterfaceName
in interface ServiceReferenceReadableRegistry
serviceInterfaceQName
- service interface namepublic Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException
ServiceReferenceReadableRegistry
lookupServiceInterfaceNames
in interface ServiceReferenceReadableRegistry
objectName
- module object nameInstanceNotFoundException
- if search did not find exactly one instancepublic String getServiceInterfaceName(String namespace, String localName)
ServiceReferenceReadableRegistry
getServiceInterfaceName
in interface ServiceReferenceReadableRegistry
namespace
- service interface namespacelocalName
- service interface local namepublic ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException
ServiceReferenceReadableRegistry
getServiceReference
in interface ServiceReferenceReadableRegistry
.config .api.ServiceReferenceWritableRegistry#saveServiceReference(String,
String, javax.management.ObjectName)
InstanceNotFoundException
public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException
checkServiceReferenceExists
in interface ServiceReferenceReadableRegistry
InstanceNotFoundException
public void close()
close
in interface AutoCloseable
Copyright © 2019 OpenDaylight. All rights reserved.