public class io.vertx.core.impl.launcher.commands.Watcher extends java.lang.Object implements java.lang.Runnable
{
private static final io.vertx.core.impl.logging.Logger LOGGER;
private final long gracePeriod;
private final java.util.Map fileMap;
private final java.util.Set filesToWatch;
private final long scanPeriod;
private final java.util.List roots;
private final java.io.File cwd;
private long lastChange;
private final java.util.List includes;
private final io.vertx.core.Handler deploy;
private final io.vertx.core.Handler undeploy;
private final java.lang.String cmd;
private volatile boolean closed;
public void <init>(java.io.File, java.util.List, io.vertx.core.Handler, io.vertx.core.Handler, java.lang.String, long, long)
{
long v, v;
java.util.HashSet v;
java.util.LinkedHashMap v;
java.lang.String v, v;
io.vertx.core.impl.logging.Logger v;
java.io.File v;
java.util.List v, v, v, v, v, v;
io.vertx.core.impl.launcher.commands.Watcher v;
io.vertx.core.Handler v, v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v := @parameter: java.io.File;
v := @parameter: java.util.List;
v := @parameter: io.vertx.core.Handler;
v := @parameter: io.vertx.core.Handler;
v := @parameter: java.lang.String;
v := @parameter: long;
v := @parameter: long;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new java.util.LinkedHashMap;
specialinvoke v.<java.util.LinkedHashMap: void <init>()>();
v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Map fileMap> = v;
v = new java.util.HashSet;
specialinvoke v.<java.util.HashSet: void <init>()>();
v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Set filesToWatch> = v;
v.<io.vertx.core.impl.launcher.commands.Watcher: long lastChange> = -1L;
v.<io.vertx.core.impl.launcher.commands.Watcher: long gracePeriod> = v;
v = specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List sanitizeIncludePatterns(java.util.List)>(v);
v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List includes> = v;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List includes>;
v = staticinvoke <io.vertx.core.impl.launcher.commands.Watcher: java.util.List extractRoots(java.io.File,java.util.List)>(v, v);
v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List roots> = v;
v.<io.vertx.core.impl.launcher.commands.Watcher: java.io.File cwd> = v;
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List roots>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.util.List)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Watched paths: \u0001");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void info(java.lang.Object)>(v);
v.<io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.Handler deploy> = v;
v.<io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.Handler undeploy> = v;
v.<io.vertx.core.impl.launcher.commands.Watcher: java.lang.String cmd> = v;
v.<io.vertx.core.impl.launcher.commands.Watcher: long scanPeriod> = v;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List roots>;
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: void addFilesToWatchedList(java.util.List)>(v);
return;
}
static java.util.List extractRoots(java.io.File, java.util.List)
{
java.util.function.Function v, v;
java.io.File v;
java.util.List v;
java.util.stream.Stream v, v, v, v;
java.lang.Object v, v;
java.util.stream.Collector v, v;
v := @parameter: java.io.File;
v := @parameter: java.util.List;
v = interfaceinvoke v.<java.util.List: java.util.stream.Stream stream()>();
v = staticinvoke <io.vertx.core.impl.launcher.commands.Watcher$lambda_extractRoots_0__1579: java.util.function.Function bootstrap$(java.io.File)>(v);
v = interfaceinvoke v.<java.util.stream.Stream: java.util.stream.Stream map(java.util.function.Function)>(v);
v = staticinvoke <java.util.stream.Collectors: java.util.stream.Collector toSet()>();
v = interfaceinvoke v.<java.util.stream.Stream: java.lang.Object collect(java.util.stream.Collector)>(v);
v = interfaceinvoke v.<java.util.Set: java.util.stream.Stream stream()>();
v = staticinvoke <io.vertx.core.impl.launcher.commands.Watcher$init__1580: java.util.function.Function bootstrap$()>();
v = interfaceinvoke v.<java.util.stream.Stream: java.util.stream.Stream map(java.util.function.Function)>(v);
v = staticinvoke <java.util.stream.Collectors: java.util.stream.Collector toList()>();
v = interfaceinvoke v.<java.util.stream.Stream: java.lang.Object collect(java.util.stream.Collector)>(v);
return v;
}
private java.util.List sanitizeIncludePatterns(java.util.List)
{
java.util.List v;
io.vertx.core.impl.launcher.commands.Watcher v;
java.util.stream.Stream v, v;
java.lang.Object v;
java.util.stream.Collector v;
java.util.function.Function v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v := @parameter: java.util.List;
v = interfaceinvoke v.<java.util.List: java.util.stream.Stream stream()>();
v = staticinvoke <io.vertx.core.impl.launcher.commands.Watcher$lambda_sanitizeIncludePatterns_1__1581: java.util.function.Function bootstrap$()>();
v = interfaceinvoke v.<java.util.stream.Stream: java.util.stream.Stream map(java.util.function.Function)>(v);
v = staticinvoke <java.util.stream.Collectors: java.util.stream.Collector toList()>();
v = interfaceinvoke v.<java.util.stream.Stream: java.lang.Object collect(java.util.stream.Collector)>(v);
return v;
}
private void addFilesToWatchedList(java.util.List)
{
java.util.function.Consumer v;
java.util.List v;
io.vertx.core.impl.launcher.commands.Watcher v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v := @parameter: java.util.List;
v = staticinvoke <io.vertx.core.impl.launcher.commands.Watcher$addFileToWatchedList__1582: java.util.function.Consumer bootstrap$(io.vertx.core.impl.launcher.commands.Watcher)>(v);
interfaceinvoke v.<java.util.List: void forEach(java.util.function.Consumer)>(v);
return;
}
public void addFileToWatchedList(java.io.File)
{
java.util.HashMap v;
long v, v, v, v;
io.vertx.core.impl.launcher.commands.Watcher$FileInfo v, v;
java.util.Map v;
int v, v;
boolean v, v;
java.util.Set v;
java.io.File v, v;
io.vertx.core.impl.launcher.commands.Watcher v;
java.io.File[] v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v := @parameter: java.io.File;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Set filesToWatch>;
interfaceinvoke v.<java.util.Set: boolean add(java.lang.Object)>(v);
v = new java.util.HashMap;
specialinvoke v.<java.util.HashMap: void <init>()>();
v = virtualinvoke v.<java.io.File: boolean isDirectory()>();
if v == 0 goto label;
v = virtualinvoke v.<java.io.File: java.io.File[] listFiles()>();
if v == null goto label;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = new io.vertx.core.impl.launcher.commands.Watcher$FileInfo;
v = virtualinvoke v.<java.io.File: long lastModified()>();
v = virtualinvoke v.<java.io.File: long length()>();
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher$FileInfo: void <init>(long,long)>(v, v);
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
v = virtualinvoke v.<java.io.File: boolean isDirectory()>();
if v == 0 goto label;
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: void addFileToWatchedList(java.io.File)>(v);
label:
v = v + 1;
goto label;
label:
v = new io.vertx.core.impl.launcher.commands.Watcher$FileInfo;
v = virtualinvoke v.<java.io.File: long lastModified()>();
v = virtualinvoke v.<java.io.File: long length()>();
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher$FileInfo: void <init>(long,long)>(v, v);
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Map fileMap>;
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
return;
}
private boolean changesHaveOccurred()
{
java.lang.IllegalStateException v;
byte v, v, v, v;
java.util.Map v, v;
boolean v, v, v, v, v, v, v, v, v, v, v, v;
io.vertx.core.impl.logging.Logger v, v, v;
java.util.Set v, v, v, v;
io.vertx.core.impl.launcher.commands.Watcher v;
java.util.HashMap v;
long v, v, v, v, v, v, v, v, v, v, v, v, v;
io.vertx.core.impl.launcher.commands.Watcher$FileInfo v, v;
java.util.HashSet v;
java.util.LinkedHashMap v;
int v, v;
java.lang.String v, v, v;
java.util.Iterator v, v, v;
java.io.File v;
java.lang.Object v, v, v, v, v, v, v;
java.io.File[] v, v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v = 0;
v = new java.util.HashSet;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Set filesToWatch>;
specialinvoke v.<java.util.HashSet: void <init>(java.util.Collection)>(v);
v = virtualinvoke v.<java.util.HashSet: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = new java.util.LinkedHashMap;
specialinvoke v.<java.util.LinkedHashMap: void <init>()>();
v = virtualinvoke v.<java.io.File: boolean isDirectory()>();
if v == 0 goto label;
v = virtualinvoke v.<java.io.File: boolean exists()>();
if v == 0 goto label;
v = virtualinvoke v.<java.io.File: java.io.File[] listFiles()>();
goto label;
label:
v = newarray (java.io.File)[0];
label:
if v != null goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Cannot scan the file system to detect file changes");
throw v;
label:
v = v;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
v = v + 1;
goto label;
label:
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Map fileMap>;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
v = new java.util.HashMap;
specialinvoke v.<java.util.HashMap: void <init>(java.util.Map)>(v);
v = virtualinvoke v.<java.util.HashMap: java.util.Set entrySet()>();
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = interfaceinvoke v.<java.util.Map$Entry: java.lang.Object getKey()>();
v = interfaceinvoke v.<java.util.Map$Entry: java.lang.Object getValue()>();
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
if v != null goto label;
interfaceinvoke v.<java.util.Map: java.lang.Object remove(java.lang.Object)>(v);
v = interfaceinvoke v.<java.util.Map: boolean isEmpty()>();
if v == 0 goto label;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Map fileMap>;
interfaceinvoke v.<java.util.Map: java.lang.Object remove(java.lang.Object)>(v);
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.Set filesToWatch>;
interfaceinvoke v.<java.util.Set: boolean remove(java.lang.Object)>(v);
label:
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.io.File)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("File: \u has been deleted");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void trace(java.lang.Object)>(v);
v = virtualinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: boolean match(java.io.File)>(v);
if v == 0 goto label;
v = 1;
goto label;
label:
v = virtualinvoke v.<java.io.File: long lastModified()>();
v = v.<io.vertx.core.impl.launcher.commands.Watcher$FileInfo: long lastModified>;
v = v cmp v;
if v != 0 goto label;
v = virtualinvoke v.<java.io.File: long length()>();
v = v.<io.vertx.core.impl.launcher.commands.Watcher$FileInfo: long length>;
v = v cmp v;
if v == 0 goto label;
label:
v = new io.vertx.core.impl.launcher.commands.Watcher$FileInfo;
v = virtualinvoke v.<java.io.File: long lastModified()>();
v = virtualinvoke v.<java.io.File: long length()>();
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher$FileInfo: void <init>(long,long)>(v, v);
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.io.File)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("File: \u has been modified");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void trace(java.lang.Object)>(v);
v = virtualinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: boolean match(java.io.File)>(v);
if v == 0 goto label;
v = 1;
goto label;
label:
v = interfaceinvoke v.<java.util.Map: java.util.Set keySet()>();
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = interfaceinvoke v.<java.util.Map: boolean containsKey(java.lang.Object)>(v);
if v != 0 goto label;
v = new io.vertx.core.impl.launcher.commands.Watcher$FileInfo;
v = virtualinvoke v.<java.io.File: long lastModified()>();
v = virtualinvoke v.<java.io.File: long length()>();
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher$FileInfo: void <init>(long,long)>(v, v);
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
v = virtualinvoke v.<java.io.File: boolean isDirectory()>();
if v == 0 goto label;
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: void addFileToWatchedList(java.io.File)>(v);
label:
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.io.File)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("File was added: \u0001");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void trace(java.lang.Object)>(v);
v = virtualinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: boolean match(java.io.File)>(v);
if v == 0 goto label;
v = 1;
goto label;
label:
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
if v == 0 goto label;
v.<io.vertx.core.impl.launcher.commands.Watcher: long lastChange> = v;
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: long lastChange>;
v = v cmp -1L;
if v == 0 goto label;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: long lastChange>;
v = v - v;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: long gracePeriod>;
v = v cmp v;
if v < 0 goto label;
v.<io.vertx.core.impl.launcher.commands.Watcher: long lastChange> = -1L;
return 1;
label:
return 0;
}
protected boolean match(java.io.File)
{
boolean v, v, v, v, v, v, v, v, v, v, v;
io.vertx.core.impl.logging.Logger v;
java.util.List v, v, v;
io.vertx.core.impl.launcher.commands.Watcher v;
int v, v, v, v;
java.lang.String v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.util.Iterator v, v;
java.io.File v, v, v;
java.lang.Object v, v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v := @parameter: java.io.File;
v = null;
v = null;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List roots>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>(v);
if v == 0 goto label;
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
goto label;
label:
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.lang.String: int length()>();
v = v + 1;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int)>(v);
goto label;
label:
if v != null goto label;
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List roots>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.util.List)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("A change in \u has been detected, but the file does not belong to a watched roots: \u0001");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void warn(java.lang.Object)>(v);
return 0;
label:
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.io.File cwd>;
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>(v);
if v == 0 goto label;
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.io.File cwd>;
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = virtualinvoke v.<java.lang.String: int length()>();
v = v + 1;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int)>(v);
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.util.List includes>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
if v == null goto label;
v = v;
v = staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: boolean isWindows()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = staticinvoke <io.vertx.core.impl.launcher.commands.FileSelector: boolean matchPath(java.lang.String,java.lang.String,boolean)>(v, v, v);
if v != 0 goto label;
label:
v = virtualinvoke v.<java.io.File: java.lang.String getAbsolutePath()>();
v = staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: boolean isWindows()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = staticinvoke <io.vertx.core.impl.launcher.commands.FileSelector: boolean matchPath(java.lang.String,java.lang.String,boolean)>(v, v, v);
if v == 0 goto label;
label:
return 1;
label:
return 0;
}
public io.vertx.core.impl.launcher.commands.Watcher watch()
{
io.vertx.core.impl.logging.Logger v;
io.vertx.core.impl.launcher.commands.Watcher v;
java.lang.Thread v;
io.vertx.core.Handler v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v = new java.lang.Thread;
specialinvoke v.<java.lang.Thread: void <init>(java.lang.Runnable)>(v);
virtualinvoke v.<java.lang.Thread: void start()>();
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void info(java.lang.Object)>("Starting the vert.x application in redeploy mode");
v = v.<io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.Handler deploy>;
interfaceinvoke v.<io.vertx.core.Handler: void handle(java.lang.Object)>(null);
return v;
}
public void close()
{
io.vertx.core.impl.logging.Logger v;
io.vertx.core.impl.launcher.commands.Watcher v;
io.vertx.core.Handler v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void info(java.lang.Object)>("Stopping redeployment");
v.<io.vertx.core.impl.launcher.commands.Watcher: boolean closed> = 1;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.Handler undeploy>;
interfaceinvoke v.<io.vertx.core.Handler: void handle(java.lang.Object)>(null);
return;
}
public void run()
{
io.vertx.core.impl.logging.Logger v;
java.lang.Throwable v;
io.vertx.core.impl.launcher.commands.Watcher v;
long v;
boolean v, v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: boolean closed>;
if v != 0 goto label;
v = specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: boolean changesHaveOccurred()>();
if v == 0 goto label;
specialinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: void trigger()>();
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: long scanPeriod>;
staticinvoke <java.lang.Thread: void sleep(long)>(v);
goto label;
label:
v := @caughtexception;
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void error(java.lang.Object,java.lang.Throwable)>("An error have been encountered while watching resources - leaving the redeploy mode", v);
virtualinvoke v.<io.vertx.core.impl.launcher.commands.Watcher: void close()>();
label:
return;
catch java.lang.Throwable from label to label with label;
}
private void trigger()
{
io.vertx.core.impl.logging.Logger v;
io.vertx.core.impl.launcher.commands.Watcher v;
long v;
io.vertx.core.Handler v, v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void info(java.lang.Object)>("Redeploying!");
v = v.<io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.Handler undeploy>;
v = staticinvoke <io.vertx.core.impl.launcher.commands.Watcher$lambda_trigger_4__1583: io.vertx.core.Handler bootstrap$(io.vertx.core.impl.launcher.commands.Watcher,long)>(v, v);
interfaceinvoke v.<io.vertx.core.Handler: void handle(java.lang.Object)>(v);
return;
}
private void executeUserCommand(io.vertx.core.Handler)
{
java.lang.ProcessBuilder$Redirect v, v;
java.lang.Throwable v;
java.util.ArrayList v;
int v;
java.lang.ProcessBuilder v, v, v;
java.lang.String v, v, v, v, v;
boolean v;
io.vertx.core.impl.logging.Logger v, v;
java.lang.Process v;
io.vertx.core.impl.launcher.commands.Watcher v;
io.vertx.core.Handler v;
v := @this: io.vertx.core.impl.launcher.commands.Watcher;
v := @parameter: io.vertx.core.Handler;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.lang.String cmd>;
if v == null goto label;
label:
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: boolean isWindows()>();
if v == 0 goto label;
staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: void addArgument(java.util.List,java.lang.String)>(v, "cmd");
staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: void addArgument(java.util.List,java.lang.String)>(v, "/c");
goto label;
label:
staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: void addArgument(java.util.List,java.lang.String)>(v, "sh");
staticinvoke <io.vertx.core.impl.launcher.commands.ExecUtils: void addArgument(java.util.List,java.lang.String)>(v, "-c");
label:
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.lang.String cmd>;
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
v = new java.lang.ProcessBuilder;
specialinvoke v.<java.lang.ProcessBuilder: void <init>(java.util.List)>(v);
v = <java.lang.ProcessBuilder$Redirect: java.lang.ProcessBuilder$Redirect INHERIT>;
v = virtualinvoke v.<java.lang.ProcessBuilder: java.lang.ProcessBuilder redirectError(java.lang.ProcessBuilder$Redirect)>(v);
v = <java.lang.ProcessBuilder$Redirect: java.lang.ProcessBuilder$Redirect INHERIT>;
v = virtualinvoke v.<java.lang.ProcessBuilder: java.lang.ProcessBuilder redirectOutput(java.lang.ProcessBuilder$Redirect)>(v);
v = virtualinvoke v.<java.lang.ProcessBuilder: java.lang.Process start()>();
v = virtualinvoke v.<java.lang.Process: int waitFor()>();
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("User command terminated with status \u0001");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void info(java.lang.Object)>(v);
label:
goto label;
label:
v := @caughtexception;
v = <io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER>;
v = v.<io.vertx.core.impl.launcher.commands.Watcher: java.lang.String cmd>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Error while executing the on-redeploy command : \'\u0001\'");
interfaceinvoke v.<io.vertx.core.impl.logging.Logger: void error(java.lang.Object,java.lang.Throwable)>(v, v);
label:
interfaceinvoke v.<io.vertx.core.Handler: void handle(java.lang.Object)>(null);
return;
catch java.lang.Throwable from label to label with label;
}
static void <clinit>()
{
io.vertx.core.impl.logging.Logger v;
v = staticinvoke <io.vertx.core.impl.logging.LoggerFactory: io.vertx.core.impl.logging.Logger getLogger(java.lang.Class)>(class "Lio/vertx/core/impl/launcher/commands/Watcher;");
<io.vertx.core.impl.launcher.commands.Watcher: io.vertx.core.impl.logging.Logger LOGGER> = v;
return;
}
}