public synchronized Ripener start()

in winegrower-core/src/main/java/org/apache/winegrower/Ripener.java [501:530]


        public synchronized Ripener start() {
            runCallbacks(LifecycleCallbacks::beforeStart, this);
            try {
                startTime = System.currentTimeMillis();
                LOGGER.info("Starting Apache Winegrower application on {}",
                        LocalDateTime.ofInstant(Instant.ofEpochMilli(startTime), ZoneId.systemDefault()));
                if (configuration.isLazyInstall()) {
                    return this;
                }
                final StandaloneScanner scanner = getScanner();
                final AtomicLong bundleIdGenerator = new AtomicLong(1);
                Stream.concat(Stream.concat(
                        scanner.findOSGiBundles().stream(),
                        scanner.findPotentialOSGiBundles().stream()),
                        scanner.findEmbeddedClasses().stream())
                        .sorted(this::compareBundles)
                        .map(it -> new OSGiBundleLifecycle(
                                it.getManifest(), it.getJar(),
                                services, registry, configuration,
                                bundleIdGenerator.getAndIncrement(),
                                it.getFiles()))
                        .peek(OSGiBundleLifecycle::start)
                        .peek(it -> registry.getBundles().put(it.getBundle().getBundleId(), it))
                        .forEach(bundle -> LOGGER.debug("Bundle {}", bundle));
                this.scanner = null; // we don't need it anymore since we don't support runtime install so make it gc friendly
            } finally {
                runCallbacks(LifecycleCallbacks::afterStart, this);
            }
            return this;
        }