public class StandardDataSource implements DataSource
Class StandardDataSource. Provides standarddatasource functionality for the Hytale server.
java.lang.Object > StandardDataSource
Field Summary
saveSchedule
Field saveSchedule.
isAssetPackBeDeleteable
Field isAssetPackBeDeleteable.
doc
Field doc.
assets
Field assets.
modifiedAsset
Field modifiedAsset.
assetsArray
Field assetsArray.
path
Field path.
hash
Field hash.
fileSaveInfos
Field fileSaveInfos.
bytes
Field bytes.
now
Field now.
iterator
Field iterator.
fileSaves
Field fileSaves.
Method Detail
StandardDataSource
public
StandardDataSource
(final String packKey, final Path rootPath, final boolean isImmutable, final PluginManifest manifest)
Method StandardDataSource.
- Parameters:
final StringpackKeyfinal PathrootPathfinal booleanisImmutablefinal PluginManifestmanifest
isInModsDirectory
boolean
isInModsDirectory
(final Path path)
Method isInModsDirectory.
- Parameters:
final Pathpath
start
void
start
()
Method start.
shutdown
void
shutdown
()
Method shutdown.
loadRecentModifications
void
loadRecentModifications
()
Method loadRecentModifications.
ExtraInfo
new
ExtraInfo
()
Method ExtraInfo.
saveRecentModifications
void
saveRecentModifications
()
Method saveRecentModifications.
canAssetPackBeDeleted
boolean
canAssetPackBeDeleted
()
Method canAssetPackBeDeleted.
resolveAbsolutePath
Path
resolveAbsolutePath
(final Path path)
Method resolveAbsolutePath.
- Parameters:
final Pathpath
getFullPathToAssetData
Path
getFullPathToAssetData
(final Path assetPath)
Method getFullPathToAssetData.
- Parameters:
final PathassetPath
isImmutable
boolean
isImmutable
()
Method isImmutable.
getRootPath
Path
getRootPath
()
Method getRootPath.
doesDirectoryExist
boolean
doesDirectoryExist
(final Path folderPath)
Method doesDirectoryExist.
- Parameters:
final PathfolderPath
createDirectory
Method createDirectory.
- Parameters:
final PathdirPathfinal EditorClienteditorClient
deleteDirectory
boolean
deleteDirectory
(final Path dirPath)
Method deleteDirectory.
- Parameters:
final PathdirPath
moveDirectory
boolean
moveDirectory
(final Path oldDirPath, final Path newDirPath)
Method moveDirectory.
- Parameters:
final PatholdDirPathfinal PathnewDirPath
doesAssetExist
boolean
doesAssetExist
(final Path assetPath)
Method doesAssetExist.
- Parameters:
final PathassetPath
getAssetBytes
byte[]
getAssetBytes
(final Path assetPath)
Method getAssetBytes.
- Parameters:
final PathassetPath
updateAsset
boolean
updateAsset
(final Path assetPath, final byte[] bytes, final EditorClient editorClient)
Method updateAsset.
- Parameters:
final PathassetPathfinal byte[]bytesfinal EditorClienteditorClient
createAsset
boolean
createAsset
(final Path assetPath, final byte[] bytes, final EditorClient editorClient)
Method createAsset.
- Parameters:
final PathassetPathfinal byte[]bytesfinal EditorClienteditorClient
shouldReloadAssetFromDisk
boolean
shouldReloadAssetFromDisk
(final Path assetPath)
Method shouldReloadAssetFromDisk.
- Parameters:
final PathassetPath
getLastModificationTimestamp
Instant
getLastModificationTimestamp
(final Path assetPath)
Method getLastModificationTimestamp.
- Parameters:
final PathassetPath
moveAsset
boolean
moveAsset
(final Path oldAssetPath, final Path newAssetPath, final EditorClient editorClient)
Method moveAsset.
- Parameters:
final PatholdAssetPathfinal PathnewAssetPathfinal EditorClienteditorClient
loadAssetTree
Method loadAssetTree.
- Parameters:
final CollectionassetTypes
getRecentlyModifiedAssets
ModifiedAsset>
getRecentlyModifiedAssets
()
Method getRecentlyModifiedAssets.
trackEditorFileSave
void
trackEditorFileSave
(final Path path, final String hash)
Method trackEditorFileSave.
- Parameters:
final Pathpathfinal Stringhash
ArrayDeque
new
ArrayDeque
()
Method ArrayDeque.
EditorFileSaveInfo
new
EditorFileSaveInfo
(hash, System.currentTimeMillis()
Method EditorFileSaveInfo.
- Parameters:
hashhashSystem.currentTimeMillis(System.currentTimeMillis(