@Transactional public class RepositoryInfoImpl extends AbstractLevel2Service implements IRepositoryInfo
Stateless ome.logic to determine disk space utilization at the server's data image mount point, e.g. /OMERO See source code documentation for more.
Copyright 2007 Glencoe Software Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt
IRepositoryInfo
Modifier and Type | Field and Description |
---|---|
static double |
CRITICAL_USAGE
Percentage (100.0 - 0.0) of disk use which will cause an exception during
sanityCheckRepository() |
static long |
INITIAL_DELAY
Time (2 minutes) between successive calls to
sanityCheckRepository() needed to trigger an actual call to
getUsageFraction() |
iQuery, iUpdate, metadata, queryFactory, sec
Constructor and Description |
---|
RepositoryInfoImpl() |
Modifier and Type | Method and Description |
---|---|
long |
getFreeSpaceInKilobytes()
This method returns the free or available space on this file system
including nested subdirectories.
|
Class<? extends ServiceInterface> |
getServiceInterface() |
double |
getUsageFraction()
Deprecated.
|
long |
getUsedSpaceInKilobytes()
Deprecated.
|
boolean |
needsSanityCheck()
Calculates based on the
cached usage and the
elapsed time whether or not a real
sanityCheckRepository() should be calculated. |
void |
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.
|
void |
sanityCheckRepository()
Checks that image data repository has not exceeded 95% disk space use
level.
|
void |
setDatadir(String datadir)
Bean injection setter for data repository directory
|
void |
setFileService(OriginalFilesService fileService)
Bean injection setter for ROMIO file service
|
void |
setPixelsService(PixelsService pixelsService)
Bean injection setter for ROMIO pixels service
|
void |
setSqlAction(SqlAction sql)
Bean injection setter for SQL operations
|
void |
setThumbnailService(ThumbnailService thumbnailService)
Bean injection setter for ROMIO thumbnail service
|
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService
public static final long INITIAL_DELAY
sanityCheckRepository()
needed to trigger an actual call to
getUsageFraction()
public static final double CRITICAL_USAGE
sanityCheckRepository()
public void setThumbnailService(ThumbnailService thumbnailService)
rootdir
- public void setPixelsService(PixelsService pixelsService)
rootdir
- public void setFileService(OriginalFilesService fileService)
rootdir
- public void setSqlAction(SqlAction sql)
rootdir
- public long getFreeSpaceInKilobytes()
IRepositoryInfo
getFreeSpaceInKilobytes
in interface IRepositoryInfo
@Deprecated public long getUsedSpaceInKilobytes()
IRepositoryInfo
getUsedSpaceInKilobytes
in interface IRepositoryInfo
@Deprecated public double getUsageFraction()
IRepositoryInfo
getUsageFraction
in interface IRepositoryInfo
public final Class<? extends ServiceInterface> getServiceInterface()
getServiceInterface
in interface SelfConfigurableService
public void setDatadir(String datadir)
datadir
- public boolean needsSanityCheck()
cached usage
and the
elapsed time
whether or not a real
sanityCheckRepository()
should be calculated.public void sanityCheckRepository() throws InternalException
IRepositoryInfo
sanityCheckRepository
in interface IRepositoryInfo
InternalException
- If there is a critical failure while sanity
checking the repository.ome.api.IRepository#sanityCheckRepository()
public void removeUnusedFiles()
IRepositoryInfo
removeUnusedFiles
in interface IRepositoryInfo
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.