HytaleAssetStore

public class HytaleAssetStore

Class HytaleAssetStore. Provides hytaleassetstore functionality for the Hytale server.

java.lang.Object > HytaleAssetStore

Field Summary

cachedInitPackets

protected SoftReference cachedInitPackets

Field cachedInitPackets.

assetMonitor

final AssetMonitor assetMonitor

Field assetMonitor.

universe

final Universe universe

Field universe.

packet

final Packet packet

Field packet.

c

final Consumer c

Field c.

item

final ItemWithAllMetadata item

Field item.

secondaryMessage

final Message secondaryMessage

Field secondaryMessage.

createdOrModifiedFilesToLoad

final ObjectArrayList createdOrModifiedFilesToLoad

Field createdOrModifiedFilesToLoad.

removedFilesToUnload

final ObjectArrayList removedFilesToUnload

Field removedFilesToUnload.

createdOrModifiedDirectories

final ObjectArrayList createdOrModifiedDirectories

Field createdOrModifiedDirectories.

removedFilesAndDirectories

final ObjectArrayList removedFilesAndDirectories

Field removedFilesAndDirectories.

path

final Path path

Field path.

start

final long start

Field start.

removedKeys

final Set removedKeys

Field removedKeys.

Method Detail

HytaleAssetStore

public public HytaleAssetStore (@Nonnull final Builder builder)

Method HytaleAssetStore.

Parameters:
@Nonnull final Builder builder

getPacketGenerator

public M> getPacketGenerator ()

Method getPacketGenerator.

getNotificationItemFunction

public ItemWithAllMetadata> getNotificationItemFunction ()

Method getNotificationItemFunction.

getEventBus

protected EventBus getEventBus ()

Method getEventBus.

addFileMonitor

public void addFileMonitor (@Nonnull final String packKey, @Nonnull final Path assetsPath)

Method addFileMonitor.

Parameters:
@Nonnull final String packKey
@Nonnull final Path assetsPath

AssetStoreMonitorHandler

public new AssetStoreMonitorHandler (packKey)

Method AssetStoreMonitorHandler.

Parameters:
packKey packKey

removeFileMonitor

public void removeFileMonitor (@Nonnull final Path path)

Method removeFileMonitor.

Parameters:
@Nonnull final Path path

handleRemoveOrUpdate

protected void handleRemoveOrUpdate (@Nullable final Set toBeRemoved, @Nullable final Map toBeUpdated, @Nonnull final AssetUpdateQuery query)

Method handleRemoveOrUpdate.

Parameters:
@Nullable final Set toBeRemoved
@Nullable final Map toBeUpdated
@Nonnull final AssetUpdateQuery query

sendAssets

public void sendAssets (@Nonnull final Consumer packetConsumer)

Method sendAssets.

Parameters:
@Nonnull final Consumer packetConsumer

sendReloadedNotification

protected void sendReloadedNotification (@Nonnull final AssetLoadResult result)

Method sendReloadedNotification.

Parameters:
@Nonnull final AssetLoadResult result

sendRemovedNotification

protected void sendRemovedNotification (@Nonnull final Set removedKeys)

Method sendRemovedNotification.

Parameters:
@Nonnull final Set removedKeys

sendNotificationKeys

protected void sendNotificationKeys (final Message primaryMessage, @Nullable final String icon, @Nonnull final Set keys)

Method sendNotificationKeys.

Parameters:
final Message primaryMessage
@Nullable final String icon
@Nonnull final Set keys

sendNotificationPaths

protected void sendNotificationPaths (final Message primaryMessage, @Nonnull final Set paths)

Method sendNotificationPaths.

Parameters:
final Message primaryMessage
@Nonnull final Set paths

builder

public M> builder (final Class tClass, final M assetMap)

Method builder.

Parameters:
final Class tClass
final M assetMap

Builder

public public Builder (final Class kClass, final Class tClass, final M assetMap)

Method Builder.

Parameters:
final Class kClass
final Class tClass
final M assetMap

setPacketGenerator

public M> setPacketGenerator (final AssetPacketGenerator packetGenerator)

Method setPacketGenerator.

Parameters:
final AssetPacketGenerator packetGenerator

setNotificationItemFunction

public M> setNotificationItemFunction (final Function notificationItemFunction)

Method setNotificationItemFunction.

Parameters:
final Function notificationItemFunction

build

public M> build ()

Method build.

getKey

public Object getKey ()

Method getKey.

test

public boolean test (final Path path, final EventKind eventKind)

Method test.

Parameters:
final Path path
final EventKind eventKind

accept

public void accept (final Map map)

Method accept.

Parameters:
final Map map

IllegalArgumentException

public new IllegalArgumentException ("Unknown eventKind " + String.valueOf(entry.getValue()

Method IllegalArgumentException.

Parameters:
"Unknown eventKind " + String.valueOf(entry.getValue(

AssetStoreMonitorEvent

public new AssetStoreMonitorEvent (this.packKey, HytaleAssetStore.this, createdOrModifiedFilesToLoad, removedFilesToUnload, createdOrModifiedDirectories, removedFilesAndDirectories)

Method AssetStoreMonitorEvent.

Parameters:
this.packKey this.packKey
HytaleAssetStore.this HytaleAssetStore.this
createdOrModifiedFilesToLoad createdOrModifiedFilesToLoad
removedFilesToUnload removedFilesToUnload
createdOrModifiedDirectories createdOrModifiedDirectories
removedFilesAndDirectories removedFilesAndDirectories