Class ImageMosaicDirectoryWalker

  • All Implemented Interfaces:
    Runnable

    public class ImageMosaicDirectoryWalker
    extends Object
    This class is in responsible for creating the index for a mosaic of images that we want to tie together as a single coverage.
    Author:
    Simone Giannecchini, GeoSolutions, Carlo Cancellieri - GeoSolutions SAS
    • Field Detail

      • stop

        protected volatile boolean stop
        Proper way to stop a thread is not by calling Thread.stop() but by using a shared variable that can be checked in order to notify a terminating condition.
      • elementIndex

        protected int elementIndex
        index of the element being processed
      • numElements

        protected int numElements
        Number of elements to process.
    • Method Detail

      • run

        public void run()
        run the directory walker
      • getStop

        public boolean getStop()
      • stop

        public void stop()
      • startTransaction

        public void startTransaction()
        Create a transaction for being used in this walker
      • rollbackTransaction

        public void rollbackTransaction()
                                 throws IOException
        Throws:
        IOException
      • commitTransaction

        public void commitTransaction()
                               throws IOException
        Throws:
        IOException
      • closeTransaction

        public void closeTransaction()
      • checkStop

        protected boolean checkStop()
      • getElementIndex

        public int getElementIndex()
        Returns:
        the elementIndex
      • getNumElements

        public int getNumElements()
        Returns:
        the numElements
      • setElementIndex

        public void setElementIndex​(int elementIndex)
        Parameters:
        elementIndex - the elementIndex to set
      • setNumElements

        public void setNumElements​(int numElements)
        Parameters:
        numElements - the numElements to set
      • skip

        public void skip​(String path)
        Warn this walker that we skip the provided path
        Parameters:
        path - the path to the file to skip