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 class
Checkpoints.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 Checkpoints
onDocumentMK(DocumentNodeStore store)
static Checkpoints
onSegmentTar(File path, org.apache.jackrabbit.guava.common.io.Closer closer)
abstract int
remove(String cp)
Removes the given checkpoint.abstract long
removeAll()
Remove all checkpoints.abstract long
removeUnreferenced()
Remove all unreferenced checkpoints.abstract int
setInfoProperty(String cp, String name, String value)
Set the property in the checkpoint metadata.
-
-
-
Method Detail
-
onSegmentTar
public static Checkpoints onSegmentTar(File path, org.apache.jackrabbit.guava.common.io.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
-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 namevalue
- new value of the property. the property will be removed if the value isnull
- Returns:
1
if the checkpoint was successfully remove,0
if there is no such checkpoint or-1
if the operation did not succeed.
-
-