Package org.apache.sling.api.resource
Class ResourceUtil.BatchResourceRemover
- java.lang.Object
-
- org.apache.sling.api.resource.ResourceUtil.BatchResourceRemover
-
- Enclosing class:
- ResourceUtil
public static class ResourceUtil.BatchResourceRemover extends java.lang.Object
A batch resource remover deletes resources in batches. Once the batch size (threshold) is reached, an intermediate commit is performed. Resource trees are deleted resource by resource starting with the deepest children first. Once all resources have been passed to the batch resource remover, a final commit needs to be called on the resource resolver.- Since:
- 2.6 (Sling API Bundle 2.8.0)
-
-
Constructor Summary
Constructors Constructor Description BatchResourceRemover(int batchSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(@NotNull Resource rsrc)
-
-
-
Method Detail
-
delete
public void delete(@NotNull @NotNull Resource rsrc) throws PersistenceException
- Throws:
PersistenceException
-
-