Class Checkpoints


  • public abstract class Checkpoints
    extends java.lang.Object
    A helper class to manage checkpoints on TarMK and DocumentMK.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Checkpoints.CP  
    • Constructor Summary

      Constructors 
      Constructor Description
      Checkpoints()  
    • Constructor Detail

      • Checkpoints

        public Checkpoints()
    • Method Detail

      • onSegmentTar

        public static Checkpoints onSegmentTar​(java.io.File path,
                                               org.apache.jackrabbit.guava.common.io.Closer closer)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • list

        public abstract java.util.List<Checkpoints.CP> list()
        Returns:
        a list of all checkpoints.
      • 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​(java.lang.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 java.util.Map<java.lang.String,​java.lang.String> getInfo​(java.lang.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​(java.lang.String cp,
                                            java.lang.String name,
                                            java.lang.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.