Package io.quarkus.deployment.dev
Class RuntimeUpdatesProcessor
java.lang.Object
io.quarkus.deployment.dev.RuntimeUpdatesProcessor
- All Implemented Interfaces:
io.quarkus.dev.spi.HotReplacementContext,Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) io.quarkus.dev.console.StatusLine(package private) Throwable(package private) Throwablestatic RuntimeUpdatesProcessorstatic final boolean(package private) Throwable -
Constructor Summary
ConstructorsConstructorDescriptionRuntimeUpdatesProcessor(Path applicationRoot, DevModeContext context, QuarkusCompiler compiler, io.quarkus.dev.spi.DevModeType devModeType, BiConsumer<Set<String>, ClassScanResult> restartCallback, BiConsumer<DevModeContext.ModuleInfo, String> copyResourceNotification, BiFunction<String, byte[], byte[]> classTransformers, TestSupport testSupport, AtomicReference<Throwable> deploymentProblem) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeploymentFailedStartHandler(Runnable service) voidaddHotReplacementSetup(io.quarkus.dev.spi.HotReplacementSetup service) voidaddPostRestartStep(Runnable runnable) voidaddPreScanStep(Runnable runnable) (package private) ClassScanResultcheckForChangedClasses(boolean firstScan) (package private) ClassScanResultcheckForChangedClasses(QuarkusCompiler compiler, Function<DevModeContext.ModuleInfo, DevModeContext.CompilationUnit> cuf, boolean firstScan, RuntimeUpdatesProcessor.TimestampSet timestampSet, boolean compilingTests) A first scan is considered done when we have visited all modules at least once.(package private) ClassScanResultcheckForChangedTestClasses(boolean firstScan) checkForFileChange(Function<DevModeContext.ModuleInfo, DevModeContext.CompilationUnit> cuf, RuntimeUpdatesProcessor.TimestampSet timestampSet) Returns the set of modified files.voidclose()voidconsumeNoRestartChanges(Consumer<Set<String>> consumer) booleandoScan(boolean userInitiated) booleandoScan(boolean userInitiated, boolean forceRestart) String[]io.quarkus.dev.spi.DevModeTypebooleanbooleanbooleanisTest()voidnotifyExtensions(Set<String> noRestartChangedFiles) This notifies registered extensions of "no-restart" changed files.setCommandLineArgs(String[] commandLineArgs) setConfiguredInstrumentationEnabled(boolean configuredInstrumentationEnabled) setDisableInstrumentationForClassPredicate(Predicate<org.jboss.jandex.ClassInfo> disableInstrumentationForClassPredicate) setDisableInstrumentationForIndexPredicate(Predicate<org.jboss.jandex.Index> disableInstrumentationForIndexPredicate) static voidsetLastStartIndex(org.jboss.jandex.IndexView lastStartIndex) setLiveReloadEnabled(boolean liveReloadEnabled) voidsetRemoteProblem(Throwable throwable) setWatchedFilePaths(Map<String, Boolean> watchedFilePaths, List<Map.Entry<Predicate<String>, Boolean>> watchedFilePredicates, boolean isTest) voidbooleanbooleanvoidupdateFile(String file, byte[] data)
-
Field Details
-
IS_LINUX
public static final boolean IS_LINUX -
INSTANCE
-
compileProblem
-
testCompileProblem
-
hotReloadProblem
-
sourceFileTimestamps
-
compileOutput
volatile io.quarkus.dev.console.StatusLine compileOutput
-
-
Constructor Details
-
RuntimeUpdatesProcessor
public RuntimeUpdatesProcessor(Path applicationRoot, DevModeContext context, QuarkusCompiler compiler, io.quarkus.dev.spi.DevModeType devModeType, BiConsumer<Set<String>, ClassScanResult> restartCallback, BiConsumer<DevModeContext.ModuleInfo, String> copyResourceNotification, BiFunction<String, byte[], byte[]> classTransformers, TestSupport testSupport, AtomicReference<Throwable> deploymentProblem)
-
-
Method Details
-
getTestSupport
-
getClassesDir
- Specified by:
getClassesDirin interfaceio.quarkus.dev.spi.HotReplacementContext
-
getSourcesDir
- Specified by:
getSourcesDirin interfaceio.quarkus.dev.spi.HotReplacementContext
-
getTestSourcesDir
- Specified by:
getTestSourcesDirin interfaceio.quarkus.dev.spi.HotReplacementContext
-
getResourcesDir
- Specified by:
getResourcesDirin interfaceio.quarkus.dev.spi.HotReplacementContext
-
getDeploymentProblem
- Specified by:
getDeploymentProblemin interfaceio.quarkus.dev.spi.HotReplacementContext
-
setRemoteProblem
- Specified by:
setRemoteProblemin interfaceio.quarkus.dev.spi.HotReplacementContext
-
updateFile
- Specified by:
updateFilein interfaceio.quarkus.dev.spi.HotReplacementContext
-
isTest
public boolean isTest()- Specified by:
isTestin interfaceio.quarkus.dev.spi.HotReplacementContext
-
getDevModeType
public io.quarkus.dev.spi.DevModeType getDevModeType()- Specified by:
getDevModeTypein interfaceio.quarkus.dev.spi.HotReplacementContext
-
doScan
- Specified by:
doScanin interfaceio.quarkus.dev.spi.HotReplacementContext- Throws:
IOException
-
doScan
public boolean doScan(boolean userInitiated, boolean forceRestart) -
notifyExtensions
This notifies registered extensions of "no-restart" changed files.- Parameters:
noRestartChangedFiles- the Set of changed files
-
instrumentationEnabled
public boolean instrumentationEnabled() -
setLiveReloadEnabled
-
setConfiguredInstrumentationEnabled
public RuntimeUpdatesProcessor setConfiguredInstrumentationEnabled(boolean configuredInstrumentationEnabled) -
addPreScanStep
- Specified by:
addPreScanStepin interfaceio.quarkus.dev.spi.HotReplacementContext
-
addPostRestartStep
- Specified by:
addPostRestartStepin interfaceio.quarkus.dev.spi.HotReplacementContext
-
consumeNoRestartChanges
- Specified by:
consumeNoRestartChangesin interfaceio.quarkus.dev.spi.HotReplacementContext
-
syncState
- Specified by:
syncStatein interfaceio.quarkus.dev.spi.HotReplacementContext
-
checkForChangedClasses
-
checkForChangedTestClasses
-
checkForChangedClasses
ClassScanResult checkForChangedClasses(QuarkusCompiler compiler, Function<DevModeContext.ModuleInfo, DevModeContext.CompilationUnit> cuf, boolean firstScan, RuntimeUpdatesProcessor.TimestampSet timestampSet, boolean compilingTests) A first scan is considered done when we have visited all modules at least once. This is useful in two ways. - To make sure that source time stamps have been recorded at least once - To avoid re-compiling on first run by ignoring all first time changes detected bycheckIfFileModified(Path, Map, boolean, boolean)during the first scan. -
getCompileProblem
-
checkForFileChange
-
checkForFileChange
Set<String> checkForFileChange(Function<DevModeContext.ModuleInfo, DevModeContext.CompilationUnit> cuf, RuntimeUpdatesProcessor.TimestampSet timestampSet) Returns the set of modified files.The returned set may contain:
- an OS-specific absolute path for a HotDeploymentWatchedFileBuildItem that matches an absolute path; e.g.
/some/complex/unix/path/to/file - an OS-agnostic relative path for a HotDeploymentWatchedFileBuildItem that matches a relative path; e.g.
templates/foo.html - an OS-agnostic relative path for a HotDeploymentWatchedFileBuildItem that matches a glob pattern,
- an OS-agnostic relative path for a new file added to a resource root.
- Parameters:
cuf-timestampSet-- Returns:
- the set of modified files
- an OS-specific absolute path for a HotDeploymentWatchedFileBuildItem that matches an absolute path; e.g.
-
setDisableInstrumentationForClassPredicate
public RuntimeUpdatesProcessor setDisableInstrumentationForClassPredicate(Predicate<org.jboss.jandex.ClassInfo> disableInstrumentationForClassPredicate) -
setDisableInstrumentationForIndexPredicate
public RuntimeUpdatesProcessor setDisableInstrumentationForIndexPredicate(Predicate<org.jboss.jandex.Index> disableInstrumentationForIndexPredicate) -
setWatchedFilePaths
-
addHotReplacementSetup
public void addHotReplacementSetup(io.quarkus.dev.spi.HotReplacementSetup service) -
addDeploymentFailedStartHandler
-
startupFailed
public void startupFailed() -
setLastStartIndex
public static void setLastStartIndex(org.jboss.jandex.IndexView lastStartIndex) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toggleInstrumentation
public boolean toggleInstrumentation() -
toggleLiveReloadEnabled
public boolean toggleLiveReloadEnabled() -
isLiveReloadEnabled
public boolean isLiveReloadEnabled() -
getCommandLineArgs
-
setCommandLineArgs
-