Class RuntimeUpdatesProcessor

java.lang.Object
io.quarkus.deployment.dev.RuntimeUpdatesProcessor
All Implemented Interfaces:
io.quarkus.dev.spi.HotReplacementContext, Closeable, AutoCloseable

public class RuntimeUpdatesProcessor extends Object implements io.quarkus.dev.spi.HotReplacementContext, Closeable
  • Field Details

    • 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
    • sourceFileTimestamps

      final Map<Path,Long> sourceFileTimestamps
    • compileOutput

      volatile io.quarkus.dev.console.StatusLine compileOutput
  • Constructor Details

  • Method Details

    • getTestSupport

      public TestSupport getTestSupport()
    • getClassesDir

      public List<Path> getClassesDir()
      Specified by:
      getClassesDir in interface io.quarkus.dev.spi.HotReplacementContext
    • getSourcesDir

      public List<Path> getSourcesDir()
      Specified by:
      getSourcesDir in interface io.quarkus.dev.spi.HotReplacementContext
    • getTestSourcesDir

      public List<Path> getTestSourcesDir()
      Specified by:
      getTestSourcesDir in interface io.quarkus.dev.spi.HotReplacementContext
    • getResourcesDir

      public List<Path> getResourcesDir()
      Specified by:
      getResourcesDir in interface io.quarkus.dev.spi.HotReplacementContext
    • getDeploymentProblem

      public Throwable getDeploymentProblem()
      Specified by:
      getDeploymentProblem in interface io.quarkus.dev.spi.HotReplacementContext
    • setRemoteProblem

      public void setRemoteProblem(Throwable throwable)
      Specified by:
      setRemoteProblem in interface io.quarkus.dev.spi.HotReplacementContext
    • updateFile

      public void updateFile(String file, byte[] data)
      Specified by:
      updateFile in interface io.quarkus.dev.spi.HotReplacementContext
    • isTest

      public boolean isTest()
      Specified by:
      isTest in interface io.quarkus.dev.spi.HotReplacementContext
    • getDevModeType

      public io.quarkus.dev.spi.DevModeType getDevModeType()
      Specified by:
      getDevModeType in interface io.quarkus.dev.spi.HotReplacementContext
    • doScan

      public boolean doScan(boolean userInitiated) throws IOException
      Specified by:
      doScan in interface io.quarkus.dev.spi.HotReplacementContext
      Throws:
      IOException
    • doScan

      public boolean doScan(boolean userInitiated, boolean forceRestart)
    • notifyExtensions

      public void notifyExtensions(Set<String> noRestartChangedFiles)
      This notifies registered extensions of "no-restart" changed files.
      Parameters:
      noRestartChangedFiles - the Set of changed files
    • instrumentationEnabled

      public boolean instrumentationEnabled()
    • setLiveReloadEnabled

      public RuntimeUpdatesProcessor setLiveReloadEnabled(boolean liveReloadEnabled)
    • setConfiguredInstrumentationEnabled

      public RuntimeUpdatesProcessor setConfiguredInstrumentationEnabled(boolean configuredInstrumentationEnabled)
    • addPreScanStep

      public void addPreScanStep(Runnable runnable)
      Specified by:
      addPreScanStep in interface io.quarkus.dev.spi.HotReplacementContext
    • addPostRestartStep

      public void addPostRestartStep(Runnable runnable)
      Specified by:
      addPostRestartStep in interface io.quarkus.dev.spi.HotReplacementContext
    • consumeNoRestartChanges

      public void consumeNoRestartChanges(Consumer<Set<String>> consumer)
      Specified by:
      consumeNoRestartChanges in interface io.quarkus.dev.spi.HotReplacementContext
    • syncState

      public Set<String> syncState(Map<String,String> fileHashes)
      Specified by:
      syncState in interface io.quarkus.dev.spi.HotReplacementContext
    • 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 by checkIfFileModified(Path, Map, boolean, boolean) during the first scan.
    • getCompileProblem

      public Throwable getCompileProblem()
    • checkForFileChange

      Set<String> checkForFileChange()
    • checkForFileChange

      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
    • 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(io.quarkus.dev.spi.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 interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • toggleInstrumentation

      public boolean toggleInstrumentation()
    • toggleLiveReloadEnabled

      public boolean toggleLiveReloadEnabled()
    • isLiveReloadEnabled

      public boolean isLiveReloadEnabled()
    • getCommandLineArgs

      public String[] getCommandLineArgs()
    • setCommandLineArgs

      public RuntimeUpdatesProcessor setCommandLineArgs(String[] commandLineArgs)