Package ome.logic

Class 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
    • Constructor Detail

      • RepositoryInfoImpl

        public RepositoryInfoImpl()
    • 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 interface ome.api.IRepositoryInfo
      • getUsedSpaceInKilobytes

        @Deprecated
        public long getUsedSpaceInKilobytes()
        Deprecated.
        Specified by:
        getUsedSpaceInKilobytes in interface ome.api.IRepositoryInfo
      • getUsageFraction

        @Deprecated
        public double getUsageFraction()
        Deprecated.
        Specified by:
        getUsageFraction in interface ome.api.IRepositoryInfo
      • getServiceInterface

        public final java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
        Specified by:
        getServiceInterface in interface ome.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 real sanityCheckRepository() should be calculated.
        Returns:
        if the repository needs a sanity check
      • sanityCheckRepository

        public void sanityCheckRepository()
                                   throws ome.conditions.InternalException
        Specified by:
        sanityCheckRepository in interface ome.api.IRepositoryInfo
        Throws:
        ome.conditions.InternalException
        See Also:
        IRepositoryInfo.sanityCheckRepository()
      • removeUnusedFiles

        public void removeUnusedFiles()
        Specified by:
        removeUnusedFiles in interface ome.api.IRepositoryInfo