Package io.quarkus.deployment.dev
Class RuntimeUpdatesProcessor
- java.lang.Object
-
- io.quarkus.deployment.dev.RuntimeUpdatesProcessor
-
- All Implemented Interfaces:
HotReplacementContext
,Closeable
,AutoCloseable
public class RuntimeUpdatesProcessor extends Object implements HotReplacementContext, Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
RuntimeUpdatesProcessor.TimestampSet
-
Field Summary
Fields Modifier and Type Field Description (package private) StatusLine
compileOutput
(package private) Throwable
compileProblem
(package private) Throwable
hotReloadProblem
static RuntimeUpdatesProcessor
INSTANCE
static boolean
IS_LINUX
(package private) Map<Path,Long>
sourceFileTimestamps
(package private) Throwable
testCompileProblem
-
Constructor Summary
Constructors Constructor Description RuntimeUpdatesProcessor(Path applicationRoot, DevModeContext context, QuarkusCompiler compiler, DevModeType devModeType, BiConsumer<Set<String>,ClassScanResult> restartCallback, BiConsumer<DevModeContext.ModuleInfo,String> copyResourceNotification, BiFunction<String,byte[],byte[]> classTransformers, TestSupport testSupport)
-
Method Summary
-
-
-
Field Detail
-
IS_LINUX
public static final boolean IS_LINUX
-
INSTANCE
public static volatile RuntimeUpdatesProcessor INSTANCE
-
compileProblem
volatile Throwable compileProblem
-
testCompileProblem
volatile Throwable testCompileProblem
-
hotReloadProblem
volatile Throwable hotReloadProblem
-
compileOutput
volatile StatusLine compileOutput
-
-
Constructor Detail
-
RuntimeUpdatesProcessor
public RuntimeUpdatesProcessor(Path applicationRoot, DevModeContext context, QuarkusCompiler compiler, DevModeType devModeType, BiConsumer<Set<String>,ClassScanResult> restartCallback, BiConsumer<DevModeContext.ModuleInfo,String> copyResourceNotification, BiFunction<String,byte[],byte[]> classTransformers, TestSupport testSupport)
-
-
Method Detail
-
getTestSupport
public TestSupport getTestSupport()
-
getClassesDir
public Path getClassesDir()
- Specified by:
getClassesDir
in interfaceHotReplacementContext
-
getSourcesDir
public List<Path> getSourcesDir()
- Specified by:
getSourcesDir
in interfaceHotReplacementContext
-
getTestSourcesDir
public List<Path> getTestSourcesDir()
- Specified by:
getTestSourcesDir
in interfaceHotReplacementContext
-
getResourcesDir
public List<Path> getResourcesDir()
- Specified by:
getResourcesDir
in interfaceHotReplacementContext
-
getDeploymentProblem
public Throwable getDeploymentProblem()
- Specified by:
getDeploymentProblem
in interfaceHotReplacementContext
-
setRemoteProblem
public void setRemoteProblem(Throwable throwable)
- Specified by:
setRemoteProblem
in interfaceHotReplacementContext
-
updateFile
public void updateFile(String file, byte[] data)
- Specified by:
updateFile
in interfaceHotReplacementContext
-
isTest
public boolean isTest()
- Specified by:
isTest
in interfaceHotReplacementContext
-
getDevModeType
public DevModeType getDevModeType()
- Specified by:
getDevModeType
in interfaceHotReplacementContext
-
doScan
public boolean doScan(boolean userInitiated) throws IOException
- Specified by:
doScan
in interfaceHotReplacementContext
- Throws:
IOException
-
doScan
public boolean doScan(boolean userInitiated, boolean forceRestart)
-
instrumentationEnabled
public boolean instrumentationEnabled()
-
setConfiguredInstrumentationEnabled
public RuntimeUpdatesProcessor setConfiguredInstrumentationEnabled(boolean configuredInstrumentationEnabled)
-
addPreScanStep
public void addPreScanStep(Runnable runnable)
- Specified by:
addPreScanStep
in interfaceHotReplacementContext
-
consumeNoRestartChanges
public void consumeNoRestartChanges(Consumer<Set<String>> consumer)
- Specified by:
consumeNoRestartChanges
in interfaceHotReplacementContext
-
syncState
public Set<String> syncState(Map<String,String> fileHashes)
- Specified by:
syncState
in interfaceHotReplacementContext
-
checkForChangedClasses
ClassScanResult checkForChangedClasses(boolean firstScan)
-
checkForChangedTestClasses
ClassScanResult checkForChangedTestClasses(boolean firstScan)
-
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
public Throwable getCompileProblem()
-
checkForFileChange
Set<String> checkForFileChange(Function<DevModeContext.ModuleInfo,DevModeContext.CompilationUnit> cuf, RuntimeUpdatesProcessor.TimestampSet timestampSet)
-
setDisableInstrumentationForClassPredicate
public RuntimeUpdatesProcessor setDisableInstrumentationForClassPredicate(Predicate<org.jboss.jandex.ClassInfo> disableInstrumentationForClassPredicate)
-
setDisableInstrumentationForIndexPredicate
public RuntimeUpdatesProcessor setDisableInstrumentationForIndexPredicate(Predicate<org.jboss.jandex.Index> disableInstrumentationForIndexPredicate)
-
setWatchedFilePaths
public RuntimeUpdatesProcessor setWatchedFilePaths(Map<String,Boolean> watchedFilePaths, List<Map.Entry<Predicate<String>,Boolean>> watchedFilePredicates, boolean isTest)
-
addHotReplacementSetup
public void addHotReplacementSetup(HotReplacementSetup service)
-
addDeploymentFailedStartHandler
public void addDeploymentFailedStartHandler(Runnable service)
-
startupFailed
public void startupFailed()
-
setLastStartIndex
public static void setLastStartIndex(org.jboss.jandex.IndexView lastStartIndex)
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
toggleInstrumentation
public boolean toggleInstrumentation()
-
toggleLiveReloadEnabled
public boolean toggleLiveReloadEnabled()
-
isLiveReloadEnabled
public boolean isLiveReloadEnabled()
-
getCommandLineArgs
public String[] getCommandLineArgs()
-
setCommandLineArgs
public RuntimeUpdatesProcessor setCommandLineArgs(String[] commandLineArgs)
-
-