use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.
the class DistributedK8sApiConfigStore method activate.
@Activate
protected void activate() {
ApplicationId appId = coreService.registerApplication(APP_ID);
apiConfigStore = storageService.<String, K8sApiConfig>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_API_CONFIG)).withName("k8s-apiconfig-store").withApplicationId(appId).build();
apiConfigStore.addListener(apiConfigMapListener);
log.info("Started");
}
use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.
the class DistributedK8sHostStore method activate.
@Activate
protected void activate() {
ApplicationId appId = coreService.registerApplication(APP_ID);
hostStore = storageService.<String, K8sHost>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_HOST)).withName("k8s-hoststore").withApplicationId(appId).build();
hostStore.addListener(hostMapListener);
log.info("Started");
}
use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.
the class DistributedK8sNodeStore method activate.
@Activate
protected void activate() {
ApplicationId appId = coreService.registerApplication(APP_ID);
nodeStore = storageService.<String, K8sNode>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_NODE)).withName("k8s-nodestore").withApplicationId(appId).build();
nodeStore.addListener(nodeMapListener);
log.info("Started");
}
use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.
the class EventSubscriptionManager method unregisterListener.
@Override
public void unregisterListener(String appName) {
ApplicationId externalAppId = checkNotNull(coreService.getAppId(appName));
registeredApps.remove(externalAppId);
}
use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.
the class EventSubscriptionManager method registeredApplication.
/**
* Checks if the application has registered.
*
* @param appName application name
* @return true if application has registered
*/
private boolean registeredApplication(String appName) {
checkNotNull(appName);
ApplicationId appId = checkNotNull(coreService.getAppId(appName));
if (registeredApps.containsKey(appId)) {
return true;
}
log.debug("{} is not registered", appName);
return false;
}
Aggregations