Class FileMoveManager

java.lang.Object
org.apache.activemq.artemis.core.server.files.FileMoveManager

public class FileMoveManager extends Object
Used to move files away. Each time a backup starts its formeter data will be moved to a backup folder called bkp.1, bkp.2, ... etc We may control the maximum number of folders so we remove old ones.
  • Field Details

  • Constructor Details

    • FileMoveManager

      public FileMoveManager(File folder)
    • FileMoveManager

      public FileMoveManager(File folder, int maxFolders, String... prefixesToPreserve)
  • Method Details

    • getMaxFolders

      public int getMaxFolders()
    • setMaxFolders

      public FileMoveManager setMaxFolders(int maxFolders)
    • doMove

      public void doMove() throws IOException
      Throws:
      IOException
    • checkOldFolders

      public void checkOldFolders()
    • getFiles

      public String[] getFiles()
      It will return non backup folders
    • getNumberOfFolders

      public int getNumberOfFolders()
    • getFolders

      public String[] getFolders()
    • getMinID

      public int getMinID()
    • getMaxID

      public int getMaxID()
    • getIDlist

      public int[] getIDlist()
    • getID

      public int getID(String folderName)
    • getFolder

      public File getFolder(int id)