/** * 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(); } }
throw new IllegalStateException("Duplicate module id: " + id + " used by module: " + getModule(id)); //$NON-NLS-1$//$NON-NLS-2$ EnumSet<Settings> settings = getActivationPolicySettings(builder); Module module = load(location, builder, revisionInfo, id, settings, startlevel); long currentTime = System.currentTimeMillis();
throw new IllegalStateException("Duplicate module id: " + id + " used by module: " + getModule(id)); //$NON-NLS-1$//$NON-NLS-2$ EnumSet<Settings> settings = getActivationPolicySettings(builder); Module module = load(location, builder, revisionInfo, id, settings, startlevel); long currentTime = System.currentTimeMillis();