use of org.eclipse.osgi.storage.Storage in project rt.equinox.framework by eclipse.
the class EquinoxBundle method update.
@Override
public void update(InputStream input) throws BundleException {
try {
Storage storage = equinoxContainer.getStorage();
storage.update(module, storage.getContentConnection(module, null, input));
signerInfos = null;
} catch (IOException e) {
// $NON-NLS-1$
throw new BundleException("Error reading bundle content.", e);
}
}
use of org.eclipse.osgi.storage.Storage in project rt.equinox.framework by eclipse.
the class EquinoxBundle method uninstall.
@Override
public void uninstall() throws BundleException {
// be sure to prime the headers with default local; calling priv method to avoid permission check
privGetHeaders(null);
Storage storage = equinoxContainer.getStorage();
storage.getModuleContainer().uninstall(module);
}
use of org.eclipse.osgi.storage.Storage in project rt.equinox.framework by eclipse.
the class ClasspathEntry method getMRBundleFiles.
private static List<BundleFile> getMRBundleFiles(BundleFile bundlefile, Generation generation) {
Storage storage = generation.getBundleInfo().getStorage();
if (storage.getRuntimeVersion().getMajor() < 9) {
return Collections.emptyList();
}
List<BundleFile> mrBundleFiles = new ArrayList<>();
for (int i = storage.getRuntimeVersion().getMajor(); i > 8; i--) {
String versionPath = BundleInfo.MULTI_RELEASE_VERSIONS + i + '/';
BundleEntry versionEntry = bundlefile.getEntry(versionPath);
if (versionEntry != null) {
mrBundleFiles.add(storage.createNestedBundleFile(versionPath, bundlefile, generation, BundleInfo.MULTI_RELEASE_FILTER_PREFIXES));
}
}
return Collections.unmodifiableList(mrBundleFiles);
}
use of org.eclipse.osgi.storage.Storage in project rt.equinox.framework by eclipse.
the class EquinoxContainer method close.
void close() {
StorageSaver currentSaver;
Storage currentStorage;
ScheduledExecutorService currentExecutor;
synchronized (this.monitor) {
serviceRegistry = null;
currentSaver = storageSaver;
currentStorage = storage;
currentExecutor = executor;
}
// do this outside of the lock to avoid deadlock
currentSaver.close();
currentStorage.close();
// Must be done last since it will result in termination of the
// framework active thread.
currentExecutor.shutdown();
}
Aggregations