private UnitCache getPersistantCache() { return UnitCacheSingleton.get(GwtTreeLogger.get(), getTargetDir(), createOptions()); }
@Override public Void call() throws UnableToCompleteException { long beforeMs = System.nanoTime() / 1000000L; minimalRebuildCacheManager.deleteCaches(); UnitCacheSingleton.clearCache(); long afterMs = System.nanoTime() / 1000000L; logger.log(TreeLogger.INFO, String.format("Cleaned in %sms.", (afterMs - beforeMs))); return null; } }
private UnitCache getPersistantCache() { return UnitCacheSingleton.get(GwtTreeLogger.get(), getTargetDir(), createOptions()); }
@Override public Void call() throws UnableToCompleteException { long beforeMs = System.nanoTime() / 1000000L; minimalRebuildCacheManager.deleteCaches(); UnitCacheSingleton.clearCache(); outboxTable.forceNextRecompileAll(); long afterMs = System.nanoTime() / 1000000L; logger.log(TreeLogger.INFO, String.format("Cleaned in %sms.", (afterMs - beforeMs))); return null; } }
File baseCacheDir = DiskCachingUtil.computePreferredCacheDir(options.getModuleNames(), logger); UnitCache unitCache = UnitCacheSingleton.get(logger, null, baseCacheDir); MinimalRebuildCacheManager minimalRebuildCacheManager = new MinimalRebuildCacheManager(logger, baseCacheDir);
File baseCacheDir = DiskCachingUtil.computePreferredCacheDir(options.getModuleNames(), logger); UnitCache unitCache = UnitCacheSingleton.get(logger, null, baseCacheDir, new CompilerOptionsImpl(options));
/** * Starts the code server with the given command line options. To shut it down, see * {@link WebServer#stop}. * * <p>Only one code server should be started at a time because the GWT compiler uses * a lot of static variables.</p> */ public static WebServer start(Options options) throws IOException, UnableToCompleteException { PrintWriterTreeLogger topLogger = new PrintWriterTreeLogger(); topLogger.setMaxDetail(options.getLogLevel()); TreeLogger startupLogger = topLogger.branch(Type.INFO, "Super Dev Mode starting up"); File baseCacheDir = DiskCachingUtil.computePreferredCacheDir(options.getModuleNames(), startupLogger); UnitCache unitCache = UnitCacheSingleton.get(startupLogger, null, baseCacheDir); MinimalRebuildCacheManager minimalRebuildCacheManager = new MinimalRebuildCacheManager(topLogger, baseCacheDir); OutboxTable outboxes = makeOutboxes(options, startupLogger, unitCache, minimalRebuildCacheManager); JobEventTable eventTable = new JobEventTable(); JobRunner runner = new JobRunner(eventTable, minimalRebuildCacheManager); JsonExporter exporter = new JsonExporter(options, outboxes); SourceHandler sourceHandler = new SourceHandler(outboxes, exporter); WebServer webServer = new WebServer(sourceHandler, exporter, outboxes, runner, eventTable, options.getBindAddress(), options.getPort()); webServer.start(topLogger); return webServer; }
/** * Starts the code server with the given command line options. To shut it down, see * {@link WebServer#stop}. * * <p>Only one code server should be started at a time because the GWT compiler uses * a lot of static variables.</p> */ public static WebServer start(Options options) throws IOException, UnableToCompleteException { PrintWriterTreeLogger topLogger = new PrintWriterTreeLogger(); topLogger.setMaxDetail(options.getLogLevel()); TreeLogger startupLogger = topLogger.branch(Type.INFO, "Super Dev Mode starting up"); File baseCacheDir = DiskCachingUtil.computePreferredCacheDir(options.getModuleNames(), startupLogger); UnitCache unitCache = UnitCacheSingleton.get( startupLogger, null, baseCacheDir, new CompilerOptionsImpl(options)); MinimalRebuildCacheManager minimalRebuildCacheManager = createMinimalRebuildCacheManager(topLogger, options, baseCacheDir); OutboxTable outboxTable = makeOutboxTable(options, startupLogger, unitCache, minimalRebuildCacheManager); JobEventTable eventTable = new JobEventTable(); JobRunner runner = new JobRunner(eventTable, minimalRebuildCacheManager); JsonExporter exporter = new JsonExporter(options, outboxTable); SourceHandler sourceHandler = new SourceHandler(outboxTable, exporter); SymbolMapHandler symbolMapHandler = new SymbolMapHandler(outboxTable); WebServer webServer = new WebServer(sourceHandler, symbolMapHandler, exporter, outboxTable, runner, eventTable, options.getBindAddress(), options.getPort()); webServer.start(topLogger); return webServer; }