AssetMonitor

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::onChange this::onChange

shutdown

public void shutdown ()

Method shutdown.

monitorDirectoryFiles

public void monitorDirectoryFiles (@Nonnull final Path path, @Nonnull final AssetMonitorHandler handler)

Method monitorDirectoryFiles.

Parameters:
@Nonnull final Path path
@Nonnull final AssetMonitorHandler handler

IllegalArgumentException

public new IllegalArgumentException (String.valueOf(path)

Method IllegalArgumentException.

Parameters:
String.valueOf(path String.valueOf(path

SkipSentryException

public new SkipSentryException (e)

Method SkipSentryException.

Parameters:
e e

removeMonitorDirectoryFiles

public void removeMonitorDirectoryFiles (@Nonnull final Path path, @Nonnull final Object key)

Method removeMonitorDirectoryFiles.

Parameters:
@Nonnull final Path path
@Nonnull final Object key

onChange

protected void onChange (@Nonnull final Path file, final EventKind eventKind)

Method onChange.

Parameters:
@Nonnull final Path file
final EventKind eventKind

FileChangeTask

public new FileChangeTask (this, path, new PathEvent(eventKind, System.nanoTime()

Method FileChangeTask.

Parameters:
this this
path path
new PathEvent(eventKind
System.nanoTime( System.nanoTime(

onDelayedChange

public void onDelayedChange (@Nonnull final Path path, @Nonnull final PathEvent pathEvent)

Method onDelayedChange.

Parameters:
@Nonnull final Path path
@Nonnull final PathEvent pathEvent

ConcurrentHashMap

public new ConcurrentHashMap ()

Method ConcurrentHashMap.

DirectoryHandlerChangeTask

public new DirectoryHandlerChangeTask (this, parent, handler)

Method DirectoryHandlerChangeTask.

Parameters:
this this
parent parent
handler handler

removeFileChangeTask

public void removeFileChangeTask (@Nonnull final FileChangeTask fileChangeTask)

Method removeFileChangeTask.

Parameters:
@Nonnull final FileChangeTask fileChangeTask

markChanged

public void markChanged (@Nonnull final Path path)

Method markChanged.

Parameters:
@Nonnull final Path path

removeHookChangeTask

public void removeHookChangeTask (@Nonnull final DirectoryHandlerChangeTask directoryHandlerChangeTask)

Method removeHookChangeTask.

Parameters:
@Nonnull final DirectoryHandlerChangeTask directoryHandlerChangeTask

runTask

static ScheduledFuture runTask (@Nonnull final Runnable task, final long millisDelay)

Method runTask.

Parameters:
@Nonnull final Runnable task
final long millisDelay