Class FileUtils

java.lang.Object
com.gigaspaces.utils.FileUtils

public class FileUtils extends Object
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • copyRecursively

      public static void copyRecursively(Path src, Path dest, String filter) throws IOException
      Throws:
      IOException
    • copyRecursively

      public static void copyRecursively(Path src, Path dest) throws IOException
      Throws:
      IOException
    • notifyOnFlushRedologToStorage

      public static void notifyOnFlushRedologToStorage(String fullSpaceName, String space, long redologSize, Path target)
    • copyRedologToTarget

      public static Path copyRedologToTarget(String spaceName, String fullSpaceName) throws IOException
      Copies the redo-log files of one member - its sqlite database with the -wal/-shm sidecars and its code map - from work/redo-log/<space> to work/redo-log-backup/<space>. All members of the space share that directory and their container names are prefixes of one another (x_container1 of the backup x_container1_1 and of x_container10), so names are matched exactly, the way SqliteStorageLayer.deleteDataFile matches them: the caller holds only this member's backlog lock, and a neighbour's files may change while they are copied. The member's files left by an earlier export are deleted first: a restart deletes the database and sqlite creates it again only on the first swap, so a member that has not swapped since has its code map alone to copy, and an old database next to it would pass for this export.
      Throws:
      IOException