/** * Installs a new revision using the specified builder, location and module. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param location the location to use for the installation * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. * @return the installed module */ final Module install(String location, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { int startlevel = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getInitialModuleStartLevel(); long id = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getNextIdAndIncrement(); EnumSet<Settings> settings = getActivationPolicySettings(builder); Module module = load(location, builder, revisionInfo, id, settings, startlevel); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); return module; } finally { writeUnlock(); } }
/** * Installs a new revision using the specified builder, location and module. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param location the location to use for the installation * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. * @return the installed module */ final Module install(String location, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { int startlevel = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getInitialModuleStartLevel(); long id = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getNextIdAndIncrement(); EnumSet<Settings> settings = getActivationPolicySettings(builder); Module module = load(location, builder, revisionInfo, id, settings, startlevel); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); return module; } finally { writeUnlock(); } }
/** * Installs a new revision using the specified builder, location and module. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param location the location to use for the installation * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. * @return the installed module */ final Module install(String location, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { int startlevel = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getInitialModuleStartLevel(); long id = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getNextIdAndIncrement(); EnumSet<Settings> settings = getActivationPolicySettings(builder); Module module = load(location, builder, revisionInfo, id, settings, startlevel); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); return module; } finally { writeUnlock(); } }
/** * Installs a new revision using the specified builder, location and module. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param location the location to use for the installation * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. * @return the installed module */ final Module install(String location, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { int startlevel = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getInitialModuleStartLevel(); long id = Constants.SYSTEM_BUNDLE_LOCATION.equals(location) ? 0 : getNextIdAndIncrement(); EnumSet<Settings> settings = getActivationPolicySettings(builder); Module module = load(location, builder, revisionInfo, id, settings, startlevel); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); return module; } finally { writeUnlock(); } }
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); return module;
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); return module;
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally {
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally {
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally {
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally {
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally {
long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally {
/** * Updates the specified module with anew revision using the specified builder. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param module the module for which the revision provides an update for * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. */ final void update(Module module, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { ModuleRevision oldRevision = module.getCurrentRevision(); ModuleRevision newRevision = builder.addRevision(module, revisionInfo); addCapabilities(newRevision); // if the old revision does not have a wiring it can safely be removed ModuleWiring oldWiring = wirings.get(oldRevision); if (oldWiring == null) { module.getRevisions().removeRevision(oldRevision); removeCapabilities(oldRevision); } // attempt to clean up removal pendings cleanupRemovalPending(); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally { writeUnlock(); } }
/** * Updates the specified module with anew revision using the specified builder. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param module the module for which the revision provides an update for * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. */ final void update(Module module, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { ModuleRevision oldRevision = module.getCurrentRevision(); ModuleRevision newRevision = builder.addRevision(module, revisionInfo); addCapabilities(newRevision); // if the old revision does not have a wiring it can safely be removed ModuleWiring oldWiring = wirings.get(oldRevision); if (oldWiring == null) { module.getRevisions().removeRevision(oldRevision); removeCapabilities(oldRevision); } // attempt to clean up removal pendings cleanupRemovalPending(); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally { writeUnlock(); } }
/** * Updates the specified module with anew revision using the specified builder. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param module the module for which the revision provides an update for * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. */ final void update(Module module, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { ModuleRevision oldRevision = module.getCurrentRevision(); ModuleRevision newRevision = builder.addRevision(module, revisionInfo); addCapabilities(newRevision); // if the old revision does not have a wiring it can safely be removed ModuleWiring oldWiring = wirings.get(oldRevision); if (oldWiring == null) { module.getRevisions().removeRevision(oldRevision); removeCapabilities(oldRevision); } // attempt to clean up removal pendings cleanupRemovalPending(); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally { writeUnlock(); } }
/** * Updates the specified module with anew revision using the specified builder. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param module the module for which the revision provides an update for * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. */ final void update(Module module, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { ModuleRevision oldRevision = module.getCurrentRevision(); ModuleRevision newRevision = builder.addRevision(module, revisionInfo); addCapabilities(newRevision); // if the old revision does not have a wiring it can safely be removed ModuleWiring oldWiring = wirings.get(oldRevision); if (oldWiring == null) { module.getRevisions().removeRevision(oldRevision); removeCapabilities(oldRevision); } // attempt to clean up removal pendings cleanupRemovalPending(); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally { writeUnlock(); } }
/** * Updates the specified module with anew revision using the specified builder. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param module the module for which the revision provides an update for * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. */ final void update(Module module, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { ModuleRevision oldRevision = module.getCurrentRevision(); ModuleRevision newRevision = builder.addRevision(module, revisionInfo); addCapabilities(newRevision); // if the old revision does not have a wiring it can safely be removed ModuleWiring oldWiring = wirings.get(oldRevision); if (oldWiring == null) { module.getRevisions().removeRevision(oldRevision); removeCapabilities(oldRevision); } // attempt to clean up removal pendings cleanupRemovalPending(); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally { writeUnlock(); } }
/** * Updates the specified module with anew revision using the specified builder. * <p> * A write operation protected by the {@link #writeLock() write} lock. * @param module the module for which the revision provides an update for * @param builder the builder to use to create the new revision * @param revisionInfo the revision info for the new revision, may be {@code null}. */ final void update(Module module, ModuleRevisionBuilder builder, Object revisionInfo) { writeLock(); try { ModuleRevision oldRevision = module.getCurrentRevision(); ModuleRevision newRevision = builder.addRevision(module, revisionInfo); addCapabilities(newRevision); // if the old revision does not have a wiring it can safely be removed ModuleWiring oldWiring = wirings.get(oldRevision); if (oldWiring == null) { module.getRevisions().removeRevision(oldRevision); removeCapabilities(oldRevision); } // attempt to clean up removal pendings cleanupRemovalPending(); long currentTime = System.currentTimeMillis(); module.setlastModified(currentTime); setSystemLastModified(currentTime); incrementTimestamps(true); } finally { writeUnlock(); } }