public class AssetMonitor
Class AssetMonitor. Provides assetmonitor functionality for the Hytale server.
java.lang.Object > AssetMonitor
Field Summary
normalize
final
Path
normalize
Field normalize.
path
final
Path
path
Field path.
oldTask
final
FileChangeTask
oldTask
Field oldTask.
createdOrModified
final
boolean
createdOrModified
Field createdOrModified.
parent
final
Path
parent
Field parent.
hook
final
AssetMonitorHandler
hook
Field hook.
Method Detail
AssetMonitor
public
public
AssetMonitor
()
Method AssetMonitor.
PathWatcherThread
public
new
PathWatcherThread
(this::onChange)
Method PathWatcherThread.
- Parameters:
this::onChangethis::onChange
shutdown
public
void
shutdown
()
Method shutdown.
monitorDirectoryFiles
public
void
monitorDirectoryFiles
(@Nonnull final Path path, @Nonnull final AssetMonitorHandler handler)
Method monitorDirectoryFiles.
- Parameters:
@Nonnull final Pathpath@Nonnull final AssetMonitorHandlerhandler
IllegalArgumentException
public
new
IllegalArgumentException
(String.valueOf(path)
Method IllegalArgumentException.
- Parameters:
String.valueOf(pathString.valueOf(path
SkipSentryException
public
new
SkipSentryException
(e)
Method SkipSentryException.
- Parameters:
ee
removeMonitorDirectoryFiles
public
void
removeMonitorDirectoryFiles
(@Nonnull final Path path, @Nonnull final Object key)
Method removeMonitorDirectoryFiles.
- Parameters:
@Nonnull final Pathpath@Nonnull final Objectkey
FileChangeTask
public
new
FileChangeTask
(this, path, new PathEvent(eventKind, System.nanoTime()
Method FileChangeTask.
- Parameters:
thisthispathpathnewPathEvent(eventKindSystem.nanoTime(System.nanoTime(
onDelayedChange
Method onDelayedChange.
- Parameters:
@Nonnull final Pathpath@Nonnull final PathEventpathEvent
ConcurrentHashMap
public
new
ConcurrentHashMap
()
Method ConcurrentHashMap.
DirectoryHandlerChangeTask
public
new
DirectoryHandlerChangeTask
(this, parent, handler)
Method DirectoryHandlerChangeTask.
- Parameters:
thisthisparentparenthandlerhandler
removeFileChangeTask
Method removeFileChangeTask.
- Parameters:
@Nonnull final FileChangeTaskfileChangeTask
markChanged
public
void
markChanged
(@Nonnull final Path path)
Method markChanged.
- Parameters:
@Nonnull final Pathpath
removeHookChangeTask
public
void
removeHookChangeTask
(@Nonnull final DirectoryHandlerChangeTask directoryHandlerChangeTask)
Method removeHookChangeTask.
- Parameters:
@Nonnull final DirectoryHandlerChangeTaskdirectoryHandlerChangeTask
runTask
static
ScheduledFuture>
runTask
(@Nonnull final Runnable task, final long millisDelay)
Method runTask.
- Parameters:
@Nonnull final Runnabletaskfinal longmillisDelay