diff options
author | gjoranv <gv@verizonmedia.com> | 2020-04-16 23:46:07 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-04-16 23:46:07 +0200 |
commit | 1343d0b5c60728788c5b12cbf527f7aeecc969d5 (patch) | |
tree | 85569071af4d8ccfa0ea99643f25551b4a793bbb /container-core | |
parent | ead20efae5c9979ba9460ea2191514378a03e35c (diff) |
Rename BundleLoader -> BundleManager
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/core/config/BundleManager.java (renamed from container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java) | 8 | ||||
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java | 7 | ||||
-rw-r--r-- | container-core/src/test/java/com/yahoo/container/core/config/BundleManagerTest.java (renamed from container-core/src/test/java/com/yahoo/container/core/config/BundleLoaderTest.java) | 6 |
3 files changed, 10 insertions, 11 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java b/container-core/src/main/java/com/yahoo/container/core/config/BundleManager.java index f1f22bb09fb..bf7c067464d 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/BundleLoader.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/BundleManager.java @@ -27,7 +27,7 @@ import static com.yahoo.container.core.BundleLoaderProperties.DISK_BUNDLE_PREFIX * @author Tony Vaagenes * @author gjoranv */ -public class BundleLoader { +public class BundleManager { /* Map of file refs of active bundles (not scheduled for uninstall) to a list of all bundles that were installed * (pre-install directive) by the bundle pointed to by the file ref (including itself). @@ -39,13 +39,13 @@ public class BundleLoader { */ private final Map<FileReference, List<Bundle>> reference2Bundles = new LinkedHashMap<>(); - private final Logger log = Logger.getLogger(BundleLoader.class.getName()); + private final Logger log = Logger.getLogger(BundleManager.class.getName()); private final Osgi osgi; // A custom bundle installer for non-disk bundles, to be used for testing private BundleInstaller customBundleInstaller = null; - public BundleLoader(Osgi osgi) { + public BundleManager(Osgi osgi) { this.osgi = osgi; } @@ -128,7 +128,7 @@ public class BundleLoader { // This is just an optimization, as installing a bundle with the same location id returns the already installed bundle. bundlesToInstall.removeAll(reference2Bundles.keySet()); - PredicateSplit<FileReference> bundlesToInstall_isDisk = partition(bundlesToInstall, BundleLoader::isDiskBundle); + PredicateSplit<FileReference> bundlesToInstall_isDisk = partition(bundlesToInstall, BundleManager::isDiskBundle); installBundlesFromDisk(bundlesToInstall_isDisk.trueValues); installBundlesFromFileDistribution(bundlesToInstall_isDisk.falseValues); diff --git a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java index ef132694e10..d87b38e8b18 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java @@ -9,7 +9,6 @@ import com.yahoo.component.ComponentSpecification; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.concurrent.ThreadFactoryFactory; import com.yahoo.config.FileReference; -import com.yahoo.container.core.config.testutil.MockOsgiWrapper; import com.yahoo.container.di.ComponentDeconstructor; import com.yahoo.container.di.Container; import com.yahoo.container.di.componentgraph.core.ComponentGraph; @@ -82,7 +81,7 @@ public class HandlersConfigurerDi { OsgiFramework osgiFramework) { this(subscriberFactory, vespaContainer, configId, deconstructor, discInjector, - new ContainerAndDiOsgi(osgiFramework, new BundleLoader(new OsgiImpl(osgiFramework)))); + new ContainerAndDiOsgi(osgiFramework, new BundleManager(new OsgiImpl(osgiFramework)))); } // Only public for testing @@ -102,9 +101,9 @@ public class HandlersConfigurerDi { private static class ContainerAndDiOsgi extends OsgiImpl implements OsgiWrapper { private final OsgiFramework osgiFramework; - private final BundleLoader bundleLoader; + private final BundleManager bundleLoader; - public ContainerAndDiOsgi(OsgiFramework osgiFramework, BundleLoader bundleLoader) { + public ContainerAndDiOsgi(OsgiFramework osgiFramework, BundleManager bundleLoader) { super(osgiFramework); this.osgiFramework = osgiFramework; this.bundleLoader = bundleLoader; diff --git a/container-core/src/test/java/com/yahoo/container/core/config/BundleLoaderTest.java b/container-core/src/test/java/com/yahoo/container/core/config/BundleManagerTest.java index 9272ba1cacd..59ae004e889 100644 --- a/container-core/src/test/java/com/yahoo/container/core/config/BundleLoaderTest.java +++ b/container-core/src/test/java/com/yahoo/container/core/config/BundleManagerTest.java @@ -15,21 +15,21 @@ import static org.junit.Assert.assertTrue; /** * @author gjoranv */ -public class BundleLoaderTest { +public class BundleManagerTest { private static final FileReference BUNDLE_1_REF = new FileReference("bundle-1"); private static final Bundle BUNDLE_1 = new TestBundle(BUNDLE_1_REF.value()); private static final FileReference BUNDLE_2_REF = new FileReference("bundle-2"); private static final Bundle BUNDLE_2 = new TestBundle(BUNDLE_2_REF.value()); - private BundleLoader bundleLoader; + private BundleManager bundleLoader; private TestOsgi osgi; @Before public void setup() { osgi = new TestOsgi(testBundles()); var bundleInstaller = new TestBundleInstaller(); - bundleLoader = new BundleLoader(osgi); + bundleLoader = new BundleManager(osgi); bundleLoader.useCustomBundleInstaller(bundleInstaller); } |