|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.logic.AbstractLevel2Service
ome.logic.RepositoryInfoImpl
@Transactional public class RepositoryInfoImpl
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
IRepositoryInfo
Field Summary | |
---|---|
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() |
Fields inherited from class ome.logic.AbstractLevel2Service |
---|
iQuery, iUpdate, metadata, queryFactory, sec |
Constructor Summary | |
---|---|
RepositoryInfoImpl()
|
Method Summary | |
---|---|
long |
getFreeSpaceInKilobytes()
This method returns the free or available space on this file system including nested subdirectories. |
Class<? extends ServiceInterface> |
getServiceInterface()
|
double |
getUsageFraction()
This method returns a double of the used space divided by the free space. |
long |
getUsedSpaceInKilobytes()
This method returns the total space in bytes for this file system including nested subdirectories. |
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 |
setSimpleJdbcOperations(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbcOps)
Bean injection setter for JDBC operations |
void |
setThumbnailService(ThumbnailService thumbnailService)
Bean injection setter for ROMIO thumbnail service |
Methods inherited from class ome.logic.AbstractLevel2Service |
---|
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long INITIAL_DELAY
sanityCheckRepository()
needed to trigger an actual call to
getUsageFraction()
public static final double CRITICAL_USAGE
sanityCheckRepository()
Constructor Detail |
---|
public RepositoryInfoImpl()
Method Detail |
---|
public void setThumbnailService(ThumbnailService thumbnailService)
rootdir
- public void setPixelsService(PixelsService pixelsService)
rootdir
- public void setFileService(OriginalFilesService fileService)
rootdir
- public void setSimpleJdbcOperations(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbcOps)
rootdir
- public long getFreeSpaceInKilobytes()
IRepositoryInfo
getFreeSpaceInKilobytes
in interface IRepositoryInfo
public long getUsedSpaceInKilobytes()
IRepositoryInfo
getUsedSpaceInKilobytes
in interface IRepositoryInfo
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 ome.conditions.InternalException
IRepositoryInfo
sanityCheckRepository
in interface IRepositoryInfo
ome.conditions.InternalException
- If there is a critical failure while sanity
checking the repository.ome.api.IRepository#sanityCheckRepository()
public void removeUnusedFiles()
IRepositoryInfo
removeUnusedFiles
in interface IRepositoryInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.