Package ome.logic
Class RepositoryInfoImpl
- java.lang.Object
-
- ome.logic.AbstractLevel2Service
-
- ome.logic.RepositoryInfoImpl
-
- All Implemented Interfaces:
ome.api.IRepositoryInfo
,ome.api.ServiceInterface
,ome.system.SelfConfigurableService
@Transactional public class RepositoryInfoImpl extends AbstractLevel2Service implements ome.api.IRepositoryInfo
Class implementation of the IRepositoryInfo service interface.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
- Since:
- 3.0
- See Also:
IRepositoryInfo
-
-
Field Summary
Fields Modifier and Type Field Description static double
CRITICAL_USAGE
Percentage (100.0 - 0.0) of disk use which will cause an exception duringsanityCheckRepository()
static long
INITIAL_DELAY
Time (2 minutes) between successive calls tosanityCheckRepository()
needed to trigger an actual call togetUsageFraction()
-
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, readOnlyStatus, sec
-
-
Constructor Summary
Constructors Constructor Description RepositoryInfoImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 realsanityCheckRepository()
should be calculated.void
removeUnusedFiles()
void
sanityCheckRepository()
void
setDatadir(java.lang.String datadir)
Bean injection setter for data repository directoryvoid
setFileService(ome.io.nio.OriginalFilesService fileService)
Bean injection setter for ROMIO file servicevoid
setPixelsService(ome.io.nio.PixelsService pixelsService)
Bean injection setter for ROMIO pixels servicevoid
setSqlAction(ome.util.SqlAction sql)
Bean injection setter for SQL operationsvoid
setThumbnailService(ome.io.nio.ThumbnailService thumbnailService)
Bean injection setter for ROMIO thumbnail service-
Methods inherited from class ome.logic.AbstractLevel2Service
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setReadOnlyStatus, setSecuritySystem, setUpdateService
-
-
-
-
Field Detail
-
INITIAL_DELAY
public static final long INITIAL_DELAY
Time (2 minutes) between successive calls tosanityCheckRepository()
needed to trigger an actual call togetUsageFraction()
- See Also:
- Constant Field Values
-
CRITICAL_USAGE
public static final double CRITICAL_USAGE
Percentage (100.0 - 0.0) of disk use which will cause an exception duringsanityCheckRepository()
- See Also:
- Constant Field Values
-
-
Method Detail
-
setThumbnailService
public void setThumbnailService(ome.io.nio.ThumbnailService thumbnailService)
Bean injection setter for ROMIO thumbnail service- Parameters:
thumbnailService
- the thumbnail service
-
setPixelsService
public void setPixelsService(ome.io.nio.PixelsService pixelsService)
Bean injection setter for ROMIO pixels service- Parameters:
pixelsService
- the pixels service
-
setFileService
public void setFileService(ome.io.nio.OriginalFilesService fileService)
Bean injection setter for ROMIO file service- Parameters:
fileService
- the raw file service
-
setSqlAction
public void setSqlAction(ome.util.SqlAction sql)
Bean injection setter for SQL operations- Parameters:
sql
- the SQL action instance
-
getFreeSpaceInKilobytes
@Transactional(readOnly=true) public long getFreeSpaceInKilobytes()
- Specified by:
getFreeSpaceInKilobytes
in interfaceome.api.IRepositoryInfo
-
getUsedSpaceInKilobytes
@Deprecated public long getUsedSpaceInKilobytes()
Deprecated.- Specified by:
getUsedSpaceInKilobytes
in interfaceome.api.IRepositoryInfo
-
getUsageFraction
@Deprecated public double getUsageFraction()
Deprecated.- Specified by:
getUsageFraction
in interfaceome.api.IRepositoryInfo
-
getServiceInterface
public final java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
- Specified by:
getServiceInterface
in interfaceome.system.SelfConfigurableService
-
setDatadir
public void setDatadir(java.lang.String datadir)
Bean injection setter for data repository directory- Parameters:
datadir
- the data repository directory
-
needsSanityCheck
public boolean needsSanityCheck()
Calculates based on the cached usage and the elapsed time whether or not a realsanityCheckRepository()
should be calculated.- Returns:
- if the repository needs a sanity check
-
sanityCheckRepository
public void sanityCheckRepository() throws ome.conditions.InternalException
- Specified by:
sanityCheckRepository
in interfaceome.api.IRepositoryInfo
- Throws:
ome.conditions.InternalException
- See Also:
IRepositoryInfo.sanityCheckRepository()
-
removeUnusedFiles
public void removeUnusedFiles()
- Specified by:
removeUnusedFiles
in interfaceome.api.IRepositoryInfo
-
-