Class Checkpoints
- java.lang.Object
-
- org.apache.jackrabbit.oak.checkpoint.Checkpoints
-
public abstract class Checkpoints extends Object
A helper class to manage checkpoints on TarMK and DocumentMK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCheckpoints.CP
-
Constructor Summary
Constructors Constructor Description Checkpoints()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Map<String,String>getInfo(String cp)Return checkpoint metadataabstract List<Checkpoints.CP>list()static CheckpointsonDocumentMK(DocumentNodeStore store)static CheckpointsonSegmentTar(File path, Closer closer)abstract intremove(String cp)Removes the given checkpoint.abstract longremoveAll()Remove all checkpoints.abstract longremoveUnreferenced()Remove all unreferenced checkpoints.abstract intsetInfoProperty(String cp, String name, String value)Set the property in the checkpoint metadata.
-
-
-
Method Detail
-
onSegmentTar
public static Checkpoints onSegmentTar(File path, Closer closer) throws IOException
- Throws:
IOException
-
onDocumentMK
public static Checkpoints onDocumentMK(DocumentNodeStore store)
-
list
public abstract 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
-1if the operation did not succeed.
-
removeUnreferenced
public abstract long removeUnreferenced()
Remove all unreferenced checkpoints.- Returns:
- the number of removed checkpoints or
-1if the operation did not succeed.
-
remove
public abstract int remove(String cp)
Removes the given checkpoint.- Parameters:
cp- a checkpoint string.- Returns:
1if the checkpoint was successfully remove,0if there is no such checkpoint or-1if 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 namevalue- new value of the property. the property will be removed if the value isnull- Returns:
1if the checkpoint was successfully remove,0if there is no such checkpoint or-1if the operation did not succeed.
-
-