final class io.helidon.config.FileSystemWatcher$Monitor extends java.lang.Object implements java.lang.Runnable
{
private final java.nio.file.WatchService watchService;
private final java.util.function.Consumer listener;
private final java.nio.file.Path target;
private final java.util.List watchServiceModifiers;
private final boolean watchingFile;
private final java.nio.file.Path watchedDir;
private volatile boolean failed;
private volatile boolean shouldStop;
private volatile boolean fileExists;
private java.nio.file.WatchKey watchKey;
private void <init>(java.util.function.Consumer, java.nio.file.Path, java.util.List)
{
java.nio.file.LinkOption[] v, v;
java.io.IOException v;
io.helidon.config.ConfigException v;
java.nio.file.FileSystem v;
java.util.function.Consumer v;
java.nio.file.WatchService v;
java.util.List v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.nio.file.Path v, v;
boolean v, v, v, v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v := @parameter: java.util.function.Consumer;
v := @parameter: java.nio.file.Path;
v := @parameter: java.util.List;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed> = 1;
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean shouldStop> = 0;
label:
v = staticinvoke <java.nio.file.FileSystems: java.nio.file.FileSystem getDefault()>();
v = virtualinvoke v.<java.nio.file.FileSystem: java.nio.file.WatchService newWatchService()>();
v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchService watchService> = v;
label:
goto label;
label:
v := @caughtexception;
v = new io.helidon.config.ConfigException;
specialinvoke v.<io.helidon.config.ConfigException: void <init>(java.lang.String,java.lang.Throwable)>("Cannot obtain WatchService.", v);
throw v;
label:
v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.function.Consumer listener> = v;
v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target> = v;
v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.List watchServiceModifiers> = v;
v = newarray (java.nio.file.LinkOption)[0];
v = staticinvoke <java.nio.file.Files: boolean exists(java.nio.file.Path,java.nio.file.LinkOption[])>(v, v);
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean fileExists> = v;
v = newarray (java.nio.file.LinkOption)[0];
v = staticinvoke <java.nio.file.Files: boolean isDirectory(java.nio.file.Path,java.nio.file.LinkOption[])>(v, v);
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean watchingFile> = v;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean watchingFile>;
if v == 0 goto label;
v = specialinvoke v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path parentDir(java.nio.file.Path)>(v);
goto label;
label:
v = v;
label:
v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path watchedDir> = v;
return;
catch java.io.IOException from label to label with label;
}
public void run()
{
java.nio.file.WatchEvent$Kind v, v, v, v, v;
java.nio.file.WatchKey v;
java.nio.file.Path v, v, v, v;
boolean v, v, v, v, v, v, v, v, v, v;
java.util.logging.Logger v, v, v, v, v;
java.util.List v;
java.util.function.Supplier v;
java.util.logging.Level v;
io.helidon.config.spi.ChangeEventType v, v, v, v;
java.lang.String v, v, v, v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.util.Iterator v;
java.util.function.Consumer v, v, v, v;
java.nio.file.WatchService v;
java.lang.Object v, v;
io.helidon.config.spi.ChangeWatcher$ChangeEvent v, v, v, v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean shouldStop>;
if v == 0 goto label;
return;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed>;
if v == 0 goto label;
specialinvoke v.<io.helidon.config.FileSystemWatcher$Monitor: void register()>();
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed>;
if v == 0 goto label;
return;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchService watchService>;
v = interfaceinvoke v.<java.nio.file.WatchService: java.nio.file.WatchKey poll()>();
if null != v goto label;
return;
label:
v = interfaceinvoke v.<java.nio.file.WatchKey: java.util.List pollEvents()>();
v = interfaceinvoke v.<java.util.List: boolean isEmpty()>();
if v == 0 goto label;
interfaceinvoke v.<java.nio.file.WatchKey: void cancel()>();
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.function.Consumer listener>;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target>;
v = <io.helidon.config.spi.ChangeEventType: io.helidon.config.spi.ChangeEventType CHANGED>;
v = staticinvoke <io.helidon.config.spi.ChangeWatcher$ChangeEvent: io.helidon.config.spi.ChangeWatcher$ChangeEvent create(java.lang.Object,io.helidon.config.spi.ChangeEventType)>(v, v);
interfaceinvoke v.<java.util.function.Consumer: void accept(java.lang.Object)>(v);
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed> = 1;
return;
label:
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 = interfaceinvoke v.<java.nio.file.WatchEvent: java.lang.Object context()>();
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean watchingFile>;
if v == 0 goto label;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target>;
v = interfaceinvoke v.<java.nio.file.Path: boolean endsWith(java.nio.file.Path)>(v);
if v == 0 goto label;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path watchedDir>;
v = interfaceinvoke v.<java.nio.file.Path: java.nio.file.Path resolve(java.nio.file.Path)>(v);
v = interfaceinvoke v.<java.nio.file.WatchEvent: java.nio.file.WatchEvent$Kind kind()>();
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind OVERFLOW>;
v = virtualinvoke v.<java.lang.Object: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.nio.file.Path)>(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[])>("Overflow event on path: \u0001");
virtualinvoke v.<java.util.logging.Logger: void finest(java.lang.String)>(v);
goto label;
label:
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind ENTRY_CREATE>;
v = virtualinvoke v.<java.lang.Object: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.nio.file.Path)>(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[])>("Entry created. Path: \u0001");
virtualinvoke v.<java.util.logging.Logger: void finest(java.lang.String)>(v);
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.function.Consumer listener>;
v = <io.helidon.config.spi.ChangeEventType: io.helidon.config.spi.ChangeEventType CREATED>;
v = staticinvoke <io.helidon.config.spi.ChangeWatcher$ChangeEvent: io.helidon.config.spi.ChangeWatcher$ChangeEvent create(java.lang.Object,io.helidon.config.spi.ChangeEventType)>(v, v);
interfaceinvoke v.<java.util.function.Consumer: void accept(java.lang.Object)>(v);
goto label;
label:
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind ENTRY_DELETE>;
if v != v goto label;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.nio.file.Path)>(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[])>("Entry deleted. Path: \u0001");
virtualinvoke v.<java.util.logging.Logger: void finest(java.lang.String)>(v);
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.function.Consumer listener>;
v = <io.helidon.config.spi.ChangeEventType: io.helidon.config.spi.ChangeEventType DELETED>;
v = staticinvoke <io.helidon.config.spi.ChangeWatcher$ChangeEvent: io.helidon.config.spi.ChangeWatcher$ChangeEvent create(java.lang.Object,io.helidon.config.spi.ChangeEventType)>(v, v);
interfaceinvoke v.<java.util.function.Consumer: void accept(java.lang.Object)>(v);
goto label;
label:
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind ENTRY_MODIFY>;
if v != v goto label;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.nio.file.Path)>(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[])>("Entry changed. Path: \u0001");
virtualinvoke v.<java.util.logging.Logger: void finest(java.lang.String)>(v);
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.function.Consumer listener>;
v = <io.helidon.config.spi.ChangeEventType: io.helidon.config.spi.ChangeEventType CHANGED>;
v = staticinvoke <io.helidon.config.spi.ChangeWatcher$ChangeEvent: io.helidon.config.spi.ChangeWatcher$ChangeEvent create(java.lang.Object,io.helidon.config.spi.ChangeEventType)>(v, v);
interfaceinvoke v.<java.util.function.Consumer: void accept(java.lang.Object)>(v);
goto label;
label:
v = interfaceinvoke v.<java.nio.file.WatchKey: boolean reset()>();
if v != 0 goto label;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = <java.util.logging.Level: java.util.logging.Level FINE>;
v = staticinvoke <io.helidon.config.FileSystemWatcher$Monitor$lambda_run_0__267: java.util.function.Supplier bootstrap$(io.helidon.config.FileSystemWatcher$Monitor)>(v);
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.util.function.Supplier)>(v, v);
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed> = 1;
label:
return;
}
private void fire(java.nio.file.Path, io.helidon.config.spi.ChangeEventType)
{
java.util.function.Consumer v;
io.helidon.config.spi.ChangeEventType v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.nio.file.Path v;
io.helidon.config.spi.ChangeWatcher$ChangeEvent v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v := @parameter: java.nio.file.Path;
v := @parameter: io.helidon.config.spi.ChangeEventType;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.function.Consumer listener>;
v = staticinvoke <io.helidon.config.spi.ChangeWatcher$ChangeEvent: io.helidon.config.spi.ChangeWatcher$ChangeEvent create(java.lang.Object,io.helidon.config.spi.ChangeEventType)>(v, v);
interfaceinvoke v.<java.util.function.Consumer: void accept(java.lang.Object)>(v);
return;
}
private synchronized void register()
{
java.lang.Object[] v;
java.nio.file.WatchEvent$Kind v, v, v;
java.util.logging.Level v;
java.nio.file.WatchKey v, v;
io.helidon.config.spi.ChangeEventType v, v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.nio.file.Path v, v, v, v, v, v;
boolean v, v, v, v, v, v;
java.nio.file.LinkOption[] v, v;
java.io.IOException v;
java.util.logging.Logger v;
java.nio.file.WatchService v;
java.util.List v;
java.nio.file.WatchEvent$Modifier[] v;
java.nio.file.WatchEvent$Kind[] v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean shouldStop>;
if v == 0 goto label;
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed> = 1;
return;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean fileExists>;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target>;
v = specialinvoke v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target(java.nio.file.Path)>(v);
v = newarray (java.nio.file.LinkOption)[0];
v = staticinvoke <java.nio.file.Files: boolean isDirectory(java.nio.file.Path,java.nio.file.LinkOption[])>(v, v);
if v == 0 goto label;
v = v;
goto label;
label:
v = specialinvoke v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path parentDir(java.nio.file.Path)>(v);
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchKey watchKey>;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchService watchService>;
v = newarray (java.nio.file.WatchEvent$Kind)[3];
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind ENTRY_CREATE>;
v[0] = v;
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind ENTRY_MODIFY>;
v[1] = v;
v = <java.nio.file.StandardWatchEventKinds: java.nio.file.WatchEvent$Kind ENTRY_DELETE>;
v[2] = v;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.util.List watchServiceModifiers>;
v = newarray (java.nio.file.WatchEvent$Modifier)[0];
v = interfaceinvoke v.<java.util.List: java.lang.Object[] toArray(java.lang.Object[])>(v);
v = interfaceinvoke v.<java.nio.file.Path: java.nio.file.WatchKey register(java.nio.file.WatchService,java.nio.file.WatchEvent$Kind[],java.nio.file.WatchEvent$Modifier[])>(v, v, v);
v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchKey watchKey> = v;
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed> = 0;
if null == v goto label;
interfaceinvoke v.<java.nio.file.WatchKey: void cancel()>();
label:
goto label;
label:
v := @caughtexception;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = <java.util.logging.Level: java.util.logging.Level FINEST>;
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String,java.lang.Throwable)>(v, "Failed to register watch service", v);
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean failed> = 1;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target>;
v = newarray (java.nio.file.LinkOption)[0];
v = staticinvoke <java.nio.file.Files: boolean exists(java.nio.file.Path,java.nio.file.LinkOption[])>(v, v);
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean fileExists> = v;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean fileExists>;
if v == v goto label;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: boolean fileExists>;
if v == 0 goto label;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target>;
v = <io.helidon.config.spi.ChangeEventType: io.helidon.config.spi.ChangeEventType CREATED>;
specialinvoke v.<io.helidon.config.FileSystemWatcher$Monitor: void fire(java.nio.file.Path,io.helidon.config.spi.ChangeEventType)>(v, v);
goto label;
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.Path target>;
v = <io.helidon.config.spi.ChangeEventType: io.helidon.config.spi.ChangeEventType DELETED>;
specialinvoke v.<io.helidon.config.FileSystemWatcher$Monitor: void fire(java.nio.file.Path,io.helidon.config.spi.ChangeEventType)>(v, v);
label:
return;
catch java.io.IOException from label to label with label;
}
private synchronized void stop()
{
java.nio.file.WatchKey v, v;
java.nio.file.WatchService v;
java.io.IOException v;
java.util.logging.Logger v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.util.logging.Level v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v.<io.helidon.config.FileSystemWatcher$Monitor: boolean shouldStop> = 1;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchKey watchKey>;
if null == v goto label;
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchKey watchKey>;
interfaceinvoke v.<java.nio.file.WatchKey: void cancel()>();
label:
v = v.<io.helidon.config.FileSystemWatcher$Monitor: java.nio.file.WatchService watchService>;
interfaceinvoke v.<java.nio.file.WatchService: void close()>();
label:
goto label;
label:
v := @caughtexception;
v = <io.helidon.config.FileSystemWatcher: java.util.logging.Logger LOGGER>;
v = <java.util.logging.Level: java.util.logging.Level FINE>;
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String,java.lang.Throwable)>(v, "Failed to close watch service", v);
label:
return;
catch java.io.IOException from label to label with label;
}
private java.nio.file.Path target(java.nio.file.Path) throws java.io.IOException
{
java.nio.file.LinkOption[] v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.nio.file.Path v, v;
boolean v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v := @parameter: java.nio.file.Path;
v = v;
label:
v = staticinvoke <java.nio.file.Files: boolean isSymbolicLink(java.nio.file.Path)>(v);
if v == 0 goto label;
v = newarray (java.nio.file.LinkOption)[0];
v = interfaceinvoke v.<java.nio.file.Path: java.nio.file.Path toRealPath(java.nio.file.LinkOption[])>(v);
goto label;
label:
return v;
}
private java.nio.file.Path parentDir(java.nio.file.Path)
{
java.lang.Object[] v;
java.lang.String v;
io.helidon.config.ConfigException v;
io.helidon.config.FileSystemWatcher$Monitor v;
java.nio.file.Path v, v, v;
v := @this: io.helidon.config.FileSystemWatcher$Monitor;
v := @parameter: java.nio.file.Path;
v = interfaceinvoke v.<java.nio.file.Path: java.nio.file.Path toAbsolutePath()>();
v = interfaceinvoke v.<java.nio.file.Path: java.nio.file.Path getParent()>();
if v != null goto label;
v = new io.helidon.config.ConfigException;
v = newarray (java.lang.Object)[1];
v[0] = v;
v = staticinvoke <java.lang.String: java.lang.String format(java.lang.String,java.lang.Object[])>("Cannot find parent directory for \'%s\' to register watch service.", v);
specialinvoke v.<io.helidon.config.ConfigException: void <init>(java.lang.String)>(v);
throw v;
label:
return v;
}
}