Package io.lighty.core.controller.impl
Class LightyControllerImpl
- java.lang.Object
-
- io.lighty.core.controller.api.AbstractLightyModule
-
- io.lighty.core.controller.impl.LightyControllerImpl
-
- All Implemented Interfaces:
LightyController
,LightyModule
,LightyModuleRegistryService
,LightyServices
public class LightyControllerImpl extends AbstractLightyModule implements LightyController, LightyServices
-
-
Constructor Summary
Constructors Constructor Description LightyControllerImpl(ExecutorService executorService, com.typesafe.config.Config actorSystemConfig, ClassLoader actorSystemClassLoader, ControllerConfiguration.DOMNotificationRouterConfig domNotificationRouterConfig, String restoreDirectoryPath, int maxDataBrokerFutureCallbackQueueSize, int maxDataBrokerFutureCallbackPoolSize, boolean metricCaptureEnabled, int mailboxCapacity, Properties distributedEosProperties, String moduleShardsConfig, String modulesConfig, org.opendaylight.controller.cluster.datastore.DatastoreContext configDatastoreContext, org.opendaylight.controller.cluster.datastore.DatastoreContext operDatastoreContext, Map<String,Object> datastoreProperties, Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo> modelSet, Optional<ControllerConfiguration.InitialConfigData> initialConfigData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opendaylight.controller.cluster.ActorSystemProvider
getActorSystemProvider()
org.opendaylight.mdsal.binding.dom.adapter.AdapterContext
getAdapterContext()
org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory
getBindingCodecTreeFactory()
org.opendaylight.mdsal.binding.api.DataBroker
getBindingDataBroker()
org.opendaylight.mdsal.binding.api.MountPointService
getBindingMountPointService()
org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer
getBindingNormalizedNodeSerializer()
org.opendaylight.mdsal.binding.api.NotificationPublishService
getBindingNotificationPublishService()
io.netty.channel.EventLoopGroup
getBossGroup()
org.opendaylight.infrautils.caches.CacheProvider
getCacheProvider()
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ClusterAdminService
getClusterAdminRPCService()
org.opendaylight.mdsal.dom.api.DOMDataBroker
getClusteredDOMDataBroker()
org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider
getClusterSingletonServiceProvider()
org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface
getConfigDatastore()
org.opendaylight.infrautils.diagstatus.DiagStatusService
getDiagStatusService()
org.opendaylight.controller.cluster.sharding.DistributedShardFactory
getDistributedShardFactory()
org.opendaylight.mdsal.dom.api.DOMActionProviderService
getDOMActionProviderService()
org.opendaylight.mdsal.dom.api.DOMActionService
getDOMActionService()
org.opendaylight.mdsal.dom.api.DOMDataTreeService
getDOMDataTreeService()
org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService
getDOMDataTreeShardingService()
org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService
getDOMEntityOwnershipService()
org.opendaylight.mdsal.dom.api.DOMMountPointService
getDOMMountPointService()
org.opendaylight.mdsal.dom.api.DOMNotificationPublishService
getDOMNotificationPublishService()
org.opendaylight.mdsal.dom.api.DOMNotificationService
getDOMNotificationService()
org.opendaylight.mdsal.dom.spi.DOMNotificationSubscriptionListenerRegistry
getDOMNotificationSubscriptionListenerRegistry()
org.opendaylight.mdsal.dom.api.DOMRpcProviderService
getDOMRpcProviderService()
org.opendaylight.mdsal.dom.api.DOMRpcService
getDOMRpcService()
org.opendaylight.mdsal.dom.api.DOMSchemaService
getDOMSchemaService()
org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider
getDOMYangTextSourceProvider()
org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService
getEntityOwnershipService()
io.netty.util.concurrent.EventExecutor
getEventExecutor()
org.opendaylight.infrautils.jobcoordinator.JobCoordinator
getJobCoordinator()
LightySystemReadyService
getLightySystemReadyService()
org.opendaylight.infrautils.metrics.MetricProvider
getMetricProvider()
org.opendaylight.mdsal.binding.api.NotificationService
getNotificationService()
org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface
getOperationalDatastore()
org.opendaylight.mdsal.binding.api.RpcProviderService
getRpcProviderService()
org.opendaylight.controller.config.threadpool.ScheduledThreadPool
getScheduledThreadPool()
org.opendaylight.yangtools.yang.model.api.SchemaContextProvider
getSchemaContextProvider()
LightyServices
getServices()
Get important controller services.org.opendaylight.infrautils.ready.SystemReadyMonitor
getSystemReadyMonitor()
org.opendaylight.controller.config.threadpool.ThreadPool
getThreadPool()
io.netty.util.Timer
getTimer()
io.netty.channel.EventLoopGroup
getWorkerGroup()
org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory
getYangParserFactory()
protected boolean
initProcedure()
This method is called inAbstractLightyModule.start()
method.List<org.opendaylight.yangtools.concepts.ObjectRegistration<org.opendaylight.yangtools.yang.binding.YangModuleInfo>>
registerModuleInfos(Iterable<? extends org.opendaylight.yangtools.yang.binding.YangModuleInfo> yangModuleInfos)
Register instances of Yang modules into global schema context.protected boolean
stopProcedure()
This method is called inAbstractLightyModule.shutdown()
method.-
Methods inherited from class io.lighty.core.controller.api.AbstractLightyModule
shutdown, start, startBlocking, startBlocking
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.lighty.core.controller.api.LightyModule
shutdown, start, startBlocking
-
-
-
-
Constructor Detail
-
LightyControllerImpl
public LightyControllerImpl(ExecutorService executorService, com.typesafe.config.Config actorSystemConfig, ClassLoader actorSystemClassLoader, ControllerConfiguration.DOMNotificationRouterConfig domNotificationRouterConfig, String restoreDirectoryPath, int maxDataBrokerFutureCallbackQueueSize, int maxDataBrokerFutureCallbackPoolSize, boolean metricCaptureEnabled, int mailboxCapacity, Properties distributedEosProperties, String moduleShardsConfig, String modulesConfig, org.opendaylight.controller.cluster.datastore.DatastoreContext configDatastoreContext, org.opendaylight.controller.cluster.datastore.DatastoreContext operDatastoreContext, Map<String,Object> datastoreProperties, Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo> modelSet, Optional<ControllerConfiguration.InitialConfigData> initialConfigData)
-
-
Method Detail
-
initProcedure
protected boolean initProcedure()
Description copied from class:AbstractLightyModule
This method is called inAbstractLightyModule.start()
method. Implementation of this method should initialize everything necessary.- Specified by:
initProcedure
in classAbstractLightyModule
- Returns:
- success of initialization
-
stopProcedure
protected boolean stopProcedure() throws InterruptedException
Description copied from class:AbstractLightyModule
This method is called inAbstractLightyModule.shutdown()
method. Implementation of this method should do everything necessary to shutdown correctly (e.g. stop initialized beans, release resources, ...).- Specified by:
stopProcedure
in classAbstractLightyModule
- Returns:
- success of stop.
- Throws:
InterruptedException
- if stopping was interrupted.
-
getServices
public LightyServices getServices()
Description copied from interface:LightyController
Get important controller services.- Specified by:
getServices
in interfaceLightyController
- Returns:
- running controller services.
-
getDiagStatusService
public org.opendaylight.infrautils.diagstatus.DiagStatusService getDiagStatusService()
- Specified by:
getDiagStatusService
in interfaceLightyServices
-
getSystemReadyMonitor
public org.opendaylight.infrautils.ready.SystemReadyMonitor getSystemReadyMonitor()
- Specified by:
getSystemReadyMonitor
in interfaceLightyServices
-
getLightySystemReadyService
public LightySystemReadyService getLightySystemReadyService()
- Specified by:
getLightySystemReadyService
in interfaceLightyServices
-
getActorSystemProvider
public org.opendaylight.controller.cluster.ActorSystemProvider getActorSystemProvider()
- Specified by:
getActorSystemProvider
in interfaceLightyServices
-
getSchemaContextProvider
public org.opendaylight.yangtools.yang.model.api.SchemaContextProvider getSchemaContextProvider()
- Specified by:
getSchemaContextProvider
in interfaceLightyServices
-
getDOMSchemaService
public org.opendaylight.mdsal.dom.api.DOMSchemaService getDOMSchemaService()
- Specified by:
getDOMSchemaService
in interfaceLightyServices
-
getDOMYangTextSourceProvider
public org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider getDOMYangTextSourceProvider()
- Specified by:
getDOMYangTextSourceProvider
in interfaceLightyServices
-
getDOMNotificationSubscriptionListenerRegistry
public org.opendaylight.mdsal.dom.spi.DOMNotificationSubscriptionListenerRegistry getDOMNotificationSubscriptionListenerRegistry()
- Specified by:
getDOMNotificationSubscriptionListenerRegistry
in interfaceLightyServices
-
getConfigDatastore
public org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface getConfigDatastore()
- Specified by:
getConfigDatastore
in interfaceLightyServices
-
getOperationalDatastore
public org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface getOperationalDatastore()
- Specified by:
getOperationalDatastore
in interfaceLightyServices
-
getDOMDataTreeShardingService
public org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService getDOMDataTreeShardingService()
- Specified by:
getDOMDataTreeShardingService
in interfaceLightyServices
-
getDOMDataTreeService
public org.opendaylight.mdsal.dom.api.DOMDataTreeService getDOMDataTreeService()
- Specified by:
getDOMDataTreeService
in interfaceLightyServices
-
getDistributedShardFactory
public org.opendaylight.controller.cluster.sharding.DistributedShardFactory getDistributedShardFactory()
- Specified by:
getDistributedShardFactory
in interfaceLightyServices
-
getYangParserFactory
public org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory getYangParserFactory()
- Specified by:
getYangParserFactory
in interfaceLightyServices
-
getBindingNormalizedNodeSerializer
public org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer getBindingNormalizedNodeSerializer()
- Specified by:
getBindingNormalizedNodeSerializer
in interfaceLightyServices
-
getBindingCodecTreeFactory
public org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory getBindingCodecTreeFactory()
- Specified by:
getBindingCodecTreeFactory
in interfaceLightyServices
-
getDOMEntityOwnershipService
public org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService getDOMEntityOwnershipService()
- Specified by:
getDOMEntityOwnershipService
in interfaceLightyServices
-
getEntityOwnershipService
public org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService getEntityOwnershipService()
- Specified by:
getEntityOwnershipService
in interfaceLightyServices
-
getClusterAdminRPCService
public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ClusterAdminService getClusterAdminRPCService()
- Specified by:
getClusterAdminRPCService
in interfaceLightyServices
-
getClusterSingletonServiceProvider
public org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider getClusterSingletonServiceProvider()
- Specified by:
getClusterSingletonServiceProvider
in interfaceLightyServices
-
getEventExecutor
public io.netty.util.concurrent.EventExecutor getEventExecutor()
- Specified by:
getEventExecutor
in interfaceLightyServices
-
getBossGroup
public io.netty.channel.EventLoopGroup getBossGroup()
- Specified by:
getBossGroup
in interfaceLightyServices
-
getWorkerGroup
public io.netty.channel.EventLoopGroup getWorkerGroup()
- Specified by:
getWorkerGroup
in interfaceLightyServices
-
getThreadPool
public org.opendaylight.controller.config.threadpool.ThreadPool getThreadPool()
- Specified by:
getThreadPool
in interfaceLightyServices
-
getScheduledThreadPool
public org.opendaylight.controller.config.threadpool.ScheduledThreadPool getScheduledThreadPool()
- Specified by:
getScheduledThreadPool
in interfaceLightyServices
-
getTimer
public io.netty.util.Timer getTimer()
- Specified by:
getTimer
in interfaceLightyServices
-
getDOMMountPointService
public org.opendaylight.mdsal.dom.api.DOMMountPointService getDOMMountPointService()
- Specified by:
getDOMMountPointService
in interfaceLightyServices
-
getDOMNotificationPublishService
public org.opendaylight.mdsal.dom.api.DOMNotificationPublishService getDOMNotificationPublishService()
- Specified by:
getDOMNotificationPublishService
in interfaceLightyServices
-
getDOMNotificationService
public org.opendaylight.mdsal.dom.api.DOMNotificationService getDOMNotificationService()
- Specified by:
getDOMNotificationService
in interfaceLightyServices
-
getClusteredDOMDataBroker
public org.opendaylight.mdsal.dom.api.DOMDataBroker getClusteredDOMDataBroker()
- Specified by:
getClusteredDOMDataBroker
in interfaceLightyServices
-
getDOMRpcService
public org.opendaylight.mdsal.dom.api.DOMRpcService getDOMRpcService()
- Specified by:
getDOMRpcService
in interfaceLightyServices
-
getDOMRpcProviderService
public org.opendaylight.mdsal.dom.api.DOMRpcProviderService getDOMRpcProviderService()
- Specified by:
getDOMRpcProviderService
in interfaceLightyServices
-
getRpcProviderService
public org.opendaylight.mdsal.binding.api.RpcProviderService getRpcProviderService()
- Specified by:
getRpcProviderService
in interfaceLightyServices
-
getBindingMountPointService
public org.opendaylight.mdsal.binding.api.MountPointService getBindingMountPointService()
- Specified by:
getBindingMountPointService
in interfaceLightyServices
-
getNotificationService
public org.opendaylight.mdsal.binding.api.NotificationService getNotificationService()
- Specified by:
getNotificationService
in interfaceLightyServices
-
getBindingNotificationPublishService
public org.opendaylight.mdsal.binding.api.NotificationPublishService getBindingNotificationPublishService()
- Specified by:
getBindingNotificationPublishService
in interfaceLightyServices
-
getBindingDataBroker
public org.opendaylight.mdsal.binding.api.DataBroker getBindingDataBroker()
- Specified by:
getBindingDataBroker
in interfaceLightyServices
-
getAdapterContext
public org.opendaylight.mdsal.binding.dom.adapter.AdapterContext getAdapterContext()
- Specified by:
getAdapterContext
in interfaceLightyServices
-
registerModuleInfos
public List<org.opendaylight.yangtools.concepts.ObjectRegistration<org.opendaylight.yangtools.yang.binding.YangModuleInfo>> registerModuleInfos(Iterable<? extends org.opendaylight.yangtools.yang.binding.YangModuleInfo> yangModuleInfos)
Description copied from interface:LightyModuleRegistryService
Register instances of Yang modules into global schema context.- Specified by:
registerModuleInfos
in interfaceLightyModuleRegistryService
- Parameters:
yangModuleInfos
- modules to register- Returns:
- list of registrations
-
getDOMActionService
public org.opendaylight.mdsal.dom.api.DOMActionService getDOMActionService()
- Specified by:
getDOMActionService
in interfaceLightyServices
-
getDOMActionProviderService
public org.opendaylight.mdsal.dom.api.DOMActionProviderService getDOMActionProviderService()
- Specified by:
getDOMActionProviderService
in interfaceLightyServices
-
getJobCoordinator
public org.opendaylight.infrautils.jobcoordinator.JobCoordinator getJobCoordinator()
- Specified by:
getJobCoordinator
in interfaceLightyServices
-
getMetricProvider
public org.opendaylight.infrautils.metrics.MetricProvider getMetricProvider()
- Specified by:
getMetricProvider
in interfaceLightyServices
-
getCacheProvider
public org.opendaylight.infrautils.caches.CacheProvider getCacheProvider()
- Specified by:
getCacheProvider
in interfaceLightyServices
-
-