Package io.quarkus.dev.spi
Interface HotReplacementContext
public interface HotReplacementContext
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPostRestartStep(Runnable runnable) Adds a task that is run after the restart is performed.voidaddPreScanStep(Runnable runnable) Adds a task that is run before a live reload scan is performed.voidconsumeNoRestartChanges(Consumer<Set<String>> consumer) The consumer is invoked if only files which don't require restart are modified.booleandoScan(boolean userInitiated) Scans for changed source files, and restarts if detected.Returns the type of the development modebooleanisTest()If this is true then this is a dev mode test case, rather than a user actually using Quarkus.voidsetRemoteProblem(Throwable throwable) This method returns a list of changed files compared to the provided map of file names to hashes.voidupdateFile(String file, byte[] data)
-
Method Details
-
getClassesDir
Path getClassesDir() -
getSourcesDir
-
getTestSourcesDir
-
getResourcesDir
-
getDeploymentProblem
Throwable getDeploymentProblem() -
setRemoteProblem
-
updateFile
-
isTest
boolean isTest()If this is true then this is a dev mode test case, rather than a user actually using Quarkus. -
getDevModeType
DevModeType getDevModeType()Returns the type of the development mode- Returns:
- the dev mode type
-
doScan
Scans for changed source files, and restarts if detected.- Parameters:
userInitiated- If this scan was initiated by a user action (e.g. refreshing a browser)- Returns:
trueif a restart was performed,falseotherwise- Throws:
Exception
-
addPreScanStep
Adds a task that is run before a live reload scan is performed.- Parameters:
runnable- The task to run
-
consumeNoRestartChanges
The consumer is invoked if only files which don't require restart are modified.- Parameters:
consumer- The input is a set of changed file paths- See Also:
-
io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem#isRestartNeeded()
-
syncState
This method returns a list of changed files compared to the provided map of file names to hashes. This is needed for remote dev mode, it is unlikely to be useful for anything else- Parameters:
fileHashes- The file hashes- Returns:
- A set of changed files
-
addPostRestartStep
Adds a task that is run after the restart is performed.
-