Set<Module> getRefreshClosure(Collection<Module> initial, Map<ModuleRevision, ModuleWiring> wiringCopy) { Set<Module> refreshClosure = new HashSet<Module>(); if (initial == null) { initial = new HashSet<Module>(); Collection<ModuleRevision> removalPending = moduleDatabase.getRemovalPending(); for (ModuleRevision revision : removalPending) { initial.add(revision.getRevisions().getModule()); } } for (Module module : initial) addDependents(module, wiringCopy, refreshClosure); return refreshClosure; }
private static void insertFragment(FragmentClasspath fragClasspath, List<FragmentClasspath> existing) { // Find a place in the fragment list to insert this fragment. long fragID = fragClasspath.getGeneration().getRevision().getRevisions().getModule().getId(); for (ListIterator<FragmentClasspath> iExisting = existing.listIterator(); iExisting.hasNext();) { long otherID = iExisting.next().getGeneration().getRevision().getRevisions().getModule().getId(); if (fragID < otherID) { iExisting.previous(); iExisting.add(fragClasspath); return; } } existing.add(fragClasspath); }
private static void insertFragment(FragmentClasspath fragClasspath, List<FragmentClasspath> existing) { // Find a place in the fragment list to insert this fragment. long fragID = fragClasspath.getGeneration().getRevision().getRevisions().getModule().getId(); for (ListIterator<FragmentClasspath> iExisting = existing.listIterator(); iExisting.hasNext();) { long otherID = iExisting.next().getGeneration().getRevision().getRevisions().getModule().getId(); if (fragID < otherID) { iExisting.previous(); iExisting.add(fragClasspath); return; } } existing.add(fragClasspath); }
private static void insertFragment(FragmentClasspath fragClasspath, List<FragmentClasspath> existing) { // Find a place in the fragment list to insert this fragment. long fragID = fragClasspath.getGeneration().getRevision().getRevisions().getModule().getId(); for (ListIterator<FragmentClasspath> iExisting = existing.listIterator(); iExisting.hasNext();) { long otherID = iExisting.next().getGeneration().getRevision().getRevisions().getModule().getId(); if (fragID < otherID) { iExisting.previous(); iExisting.add(fragClasspath); return; } } existing.add(fragClasspath); }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); for (ModuleRevision fragment : fragments) { try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragment, getWiring().getRevision().getRevisions().getModule()); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } } } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
private void clearManifestCache(ModuleWiring moduleWiring) { boolean frameworkActive = Module.ACTIVE_SET.contains(storage.getModuleContainer().getModule(0).getState()); ModuleRevision revision = moduleWiring.getRevision(); Module module = revision.getRevisions().getModule(); boolean isUninstallingOrUninstalled = State.UNINSTALLED.equals(module.getState()) ^ module.holdsTransitionEventLock(ModuleEvent.UNINSTALLED); if (!frameworkActive || !isUninstallingOrUninstalled) { // only do this when the framework is not active or when the bundle is not uninstalled Generation generation = (Generation) moduleWiring.getRevision().getRevisionInfo(); generation.clearManifestCache(); } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); for (ModuleRevision fragment : fragments) { try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragment, getWiring().getRevision().getRevisions().getModule()); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } } getClasspathManager().loadFragments(fragments); } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }
@Override public void loadFragments(Collection<ModuleRevision> fragments) { Module systemModule = getWiring().getRevision().getRevisions().getModule(); try { this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragments, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } getClasspathManager().loadFragments(fragments); } }