Class ApplicationUpdateStorage
java.lang.Object
lu.kbra.modelizer_next.bootstrap.subapp.ApplicationUpdateStorage
Handles paths and file operations for downloaded application update artifacts.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an application update storage instance.ApplicationUpdateStorage(ApplicationInventory inventory) Creates an application update storage instance. -
Method Summary
Modifier and TypeMethodDescriptionlongCalculates the disk usage bytes during bootstrap/update processing.intCounts regular files in the supplied directory tree.longfreeUnusedUpdates(UpdateChannel activeChannel, InstalledApplication activeApplication) Deletes downloaded update files that are no longer needed.Returns the updates directory.
-
Field Details
-
MAX_RETAINED_UPDATES_PER_CHANNEL
public static final int MAX_RETAINED_UPDATES_PER_CHANNEL- See Also:
-
-
Constructor Details
-
ApplicationUpdateStorage
public ApplicationUpdateStorage()Creates an application update storage instance. -
ApplicationUpdateStorage
Creates an application update storage instance.- Parameters:
inventory- inventory value used by the operation
-
-
Method Details
-
getUpdatesDirectory
Returns the updates directory.- Returns:
- the updates directory
-
countFiles
Counts regular files in the supplied directory tree.- Returns:
- the count files result
- Throws:
IOException- if the operation cannot be completed
-
calculateDiskUsageBytes
Calculates the disk usage bytes during bootstrap/update processing.- Returns:
- the calculate disk usage bytes result
- Throws:
IOException- if the operation cannot be completed
-
freeUnusedUpdates
public long freeUnusedUpdates(UpdateChannel activeChannel, InstalledApplication activeApplication) throws IOException Deletes downloaded update files that are no longer needed.- Parameters:
activeChannel- active channel value used by the operationactiveApplication- active application value used by the operation- Returns:
- the free unused updates result
- Throws:
IOException- if the operation cannot be completed
-