Class Checkpoints


  • public abstract class Checkpoints
    extends Object
    A helper class to manage checkpoints on TarMK and DocumentMK.
    • Constructor Detail

      • Checkpoints

        public Checkpoints()
    • Method Detail

      • removeAll

        public abstract long removeAll()
        Remove all checkpoints.
        Returns:
        the number of removed checkpoints or -1 if the operation did not succeed.
      • removeUnreferenced

        public abstract long removeUnreferenced()
        Remove all unreferenced checkpoints.
        Returns:
        the number of removed checkpoints or -1 if the operation did not succeed.
      • remove

        public abstract int remove​(String cp)
        Removes the given checkpoint.
        Parameters:
        cp - a checkpoint string.
        Returns:
        1 if the checkpoint was successfully remove, 0 if there is no such checkpoint or -1 if the operation did not succeed.
      • getInfo

        public abstract Map<String,​String> getInfo​(String cp)
        Return checkpoint metadata
        Parameters:
        cp - a checkpoint string.
        Returns:
        checkpoints metadata map or null if checkpoint can't be found
      • setInfoProperty

        public abstract int setInfoProperty​(String cp,
                                            String name,
                                            String value)
        Set the property in the checkpoint metadata.
        Parameters:
        cp - a checkpoint string.
        name - property name
        value - new value of the property. the property will be removed if the value is null
        Returns:
        1 if the checkpoint was successfully remove, 0 if there is no such checkpoint or -1 if the operation did not succeed.