@Transactional public class RepositoryInfoImpl extends AbstractLevel2Service implements ome.api.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, readOnlyStatus, sec
Constructor and Description |
---|
RepositoryInfoImpl() |
Modifier and Type | Method and Description |
---|---|
long |
getFreeSpaceInKilobytes() |
java.lang.Class<? extends ome.api.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() |
void |
sanityCheckRepository() |
void |
setDatadir(java.lang.String datadir)
Bean injection setter for data repository directory
|
void |
setFileService(ome.io.nio.OriginalFilesService fileService)
Bean injection setter for ROMIO file service
|
void |
setPixelsService(ome.io.nio.PixelsService pixelsService)
Bean injection setter for ROMIO pixels service
|
void |
setSqlAction(ome.util.SqlAction sql)
Bean injection setter for SQL operations
|
void |
setThumbnailService(ome.io.nio.ThumbnailService thumbnailService)
Bean injection setter for ROMIO thumbnail service
|
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setReadOnlyStatus, 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(ome.io.nio.ThumbnailService thumbnailService)
thumbnailService
- the thumbnail servicepublic void setPixelsService(ome.io.nio.PixelsService pixelsService)
pixelsService
- the pixels servicepublic void setFileService(ome.io.nio.OriginalFilesService fileService)
fileService
- the raw file servicepublic void setSqlAction(ome.util.SqlAction sql)
sql
- the SQL action instance@Transactional(readOnly=true) public long getFreeSpaceInKilobytes()
getFreeSpaceInKilobytes
in interface ome.api.IRepositoryInfo
@Deprecated public long getUsedSpaceInKilobytes()
getUsedSpaceInKilobytes
in interface ome.api.IRepositoryInfo
@Deprecated public double getUsageFraction()
getUsageFraction
in interface ome.api.IRepositoryInfo
public final java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
getServiceInterface
in interface ome.system.SelfConfigurableService
public void setDatadir(java.lang.String datadir)
datadir
- the data repository directorypublic boolean needsSanityCheck()
sanityCheckRepository()
should be calculated.public void sanityCheckRepository() throws ome.conditions.InternalException
sanityCheckRepository
in interface ome.api.IRepositoryInfo
ome.conditions.InternalException
IRepositoryInfo.sanityCheckRepository()
public void removeUnusedFiles()
removeUnusedFiles
in interface ome.api.IRepositoryInfo