Class StandardDataSource
java.lang.Object
com.hypixel.hytale.builtin.asseteditor.datasource.StandardDataSource
- All Implemented Interfaces:
DataSource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AssetTreeprivate final ConcurrentHashMap<Path, Deque<StandardDataSource.EditorFileSaveInfo>> private final AtomicBooleanprivate booleanprivate final booleanprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate final PluginManifestprivate final Map<Path, ModifiedAsset> private final Stringprivate final Pathprivate final Pathprivate ScheduledFuture<?> -
Constructor Summary
ConstructorsConstructorDescriptionStandardDataSource(String packKey, Path rootPath, boolean isImmutable, PluginManifest manifest) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancreateAsset(Path assetPath, byte[] bytes, EditorClient editorClient) booleancreateDirectory(Path dirPath, EditorClient editorClient) booleandeleteAsset(Path assetPath, EditorClient editorClient) booleandeleteDirectory(Path dirPath) booleandoesAssetExist(Path assetPath) booleandoesDirectoryExist(Path folderPath) byte[]getAssetBytes(Path assetPath) getFullPathToAssetData(Path assetPath) getLastModificationTimestamp(Path assetPath) booleanprivate static booleanisInModsDirectory(Path path) loadAssetTree(Collection<AssetTypeHandler> assetTypes) private voidbooleanmoveAsset(Path oldAssetPath, Path newAssetPath, EditorClient editorClient) booleanmoveDirectory(Path oldDirPath, Path newDirPath) voidputModifiedAsset(ModifiedAsset modifiedAsset) resolveAbsolutePath(Path path) voidbooleanshouldReloadAssetFromDisk(Path assetPath) voidshutdown()voidstart()private voidtrackEditorFileSave(Path path, String hash) booleanupdateAsset(Path assetPath, byte[] bytes, EditorClient editorClient) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.builtin.asseteditor.datasource.DataSource
updateRuntimeAssets
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
rootPath
-
editorSaves
-
assetTree
-
packKey
-
manifest
-
isImmutable
private final boolean isImmutable -
recentModificationsFilePath
-
indexNeedsSaving
-
modifiedAssets
-
saveSchedule
-
isAssetPackBeDeleteable
private boolean isAssetPackBeDeleteable
-
-
Constructor Details
-
StandardDataSource
public StandardDataSource(String packKey, Path rootPath, boolean isImmutable, PluginManifest manifest)
-
-
Method Details
-
isInModsDirectory
-
start
public void start()- Specified by:
startin interfaceDataSource
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceDataSource
-
loadRecentModifications
private void loadRecentModifications() -
saveRecentModifications
public void saveRecentModifications() -
canAssetPackBeDeleted
public boolean canAssetPackBeDeleted() -
resolveAbsolutePath
-
getFullPathToAssetData
- Specified by:
getFullPathToAssetDatain interfaceDataSource
-
getAssetTree
- Specified by:
getAssetTreein interfaceDataSource
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutablein interfaceDataSource
-
getRootPath
- Specified by:
getRootPathin interfaceDataSource
-
getManifest
- Specified by:
getManifestin interfaceDataSource
-
doesDirectoryExist
- Specified by:
doesDirectoryExistin interfaceDataSource
-
createDirectory
- Specified by:
createDirectoryin interfaceDataSource
-
deleteDirectory
- Specified by:
deleteDirectoryin interfaceDataSource
-
moveDirectory
- Specified by:
moveDirectoryin interfaceDataSource
-
doesAssetExist
- Specified by:
doesAssetExistin interfaceDataSource
-
getAssetBytes
- Specified by:
getAssetBytesin interfaceDataSource
-
updateAsset
- Specified by:
updateAssetin interfaceDataSource
-
createAsset
- Specified by:
createAssetin interfaceDataSource
-
deleteAsset
- Specified by:
deleteAssetin interfaceDataSource
-
shouldReloadAssetFromDisk
- Specified by:
shouldReloadAssetFromDiskin interfaceDataSource
-
getLastModificationTimestamp
- Specified by:
getLastModificationTimestampin interfaceDataSource
-
moveAsset
- Specified by:
moveAssetin interfaceDataSource
-
loadAssetTree
- Specified by:
loadAssetTreein interfaceDataSource
-
putModifiedAsset
-
getRecentlyModifiedAssets
-
trackEditorFileSave
-