Version: 5.4.10-ice35-b105

OmeroBlitz API
Home Previous Up Next Index

omero::api::IRepositoryInfo

Overview

[ "ami", "amd" ] interface IRepositoryInfo extends ServiceInterface

Provides methods for obtaining information for server repository disk space allocation. Could be used generically to obtain usage information for any mount point, however, this interface is prepared for the API to provide methods to obtain usage info for the server filesystem containing the image uploads. For the OMERO server base this is /OMERO. For this implementation it could be anything e.g. /Data1. Methods that fail or cannot execute on the server will throw an InternalException. This would not be normal and would indicate some server or disk failure.

Operation Index

getUsedSpaceInKilobytes
Returns the total space in bytes for this file system including nested subdirectories.
getFreeSpaceInKilobytes
Returns the free or available space on this file system including nested subdirectories.
getUsageFraction
Returns a double of the used space divided by the free space.
sanityCheckRepository
Checks that image data repository has not exceeded 95% disk space use level.
removeUnusedFiles
Removes all files from the server that do not have an OriginalFile complement in the database, all the Pixels that do not have a complement in the database and all the Thumbnail's that do not have a complement in the database.

Operations

long getUsedSpaceInKilobytes() throws ServerError

Returns the total space in bytes for this file system including nested subdirectories.

Return Value

Total space used on this file system.

Exceptions

ResourceError
If there is a problem retrieving disk space used.

long getFreeSpaceInKilobytes() throws ServerError

Returns the free or available space on this file system including nested subdirectories.

Return Value

Free space on this file system in KB.

Exceptions

ResourceError
If there is a problem retrieving disk space free.

double getUsageFraction() throws ServerError

Returns a double of the used space divided by the free space. This method will be called by a client to watch the repository filesystem so that it doesn't exceed 95% full.

Return Value

Fraction of used/free.

Exceptions

ResourceError
If there is a problem calculating the usage fraction.

void sanityCheckRepository() throws ServerError

Checks that image data repository has not exceeded 95% disk space use level.

Exceptions

ResourceError
If the repository usage has exceeded 95%.
InternalException
If there is a critical failure while sanity checking the repository.

void removeUnusedFiles() throws ServerError

Removes all files from the server that do not have an OriginalFile complement in the database, all the Pixels that do not have a complement in the database and all the Thumbnail's that do not have a complement in the database.

Exceptions

ResourceError
If deletion fails.

Home Previous Up Next Index