Class AutoSave
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.io.AutoSave
-
public class AutoSave extends java.lang.Object
AutoSave
...
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoSave
copy()
int
getThreshold()
Returns the thresholdboolean
isDryRun()
void
markMissing(java.lang.String path)
void
markResolved(java.lang.String path)
boolean
modified(int num)
Addsnum
modifiedboolean
needsSave()
Returnstrue
if more thangetThreshold()
nodes are modified.void
save(Session session)
saves the changes under the given node and resets the countervoid
setDebugFailEach(int debugFailEach)
Debug settings to allows to produce failures after eachdebugFailEach
save.void
setDryRun(boolean dryRun)
void
setThreshold(int threshold)
Sets the thresholdvoid
setTracker(ProgressTracker tracker)
java.lang.String
toString()
-
-
-
Method Detail
-
copy
public AutoSave copy()
-
setTracker
public void setTracker(@Nullable ProgressTracker tracker)
-
isDryRun
public boolean isDryRun()
-
setDryRun
public void setDryRun(boolean dryRun)
-
setDebugFailEach
public void setDebugFailEach(int debugFailEach)
Debug settings to allows to produce failures after eachdebugFailEach
save.- Parameters:
debugFailEach
- cardinal indicating when to fail
-
needsSave
public boolean needsSave()
Returnstrue
if more thangetThreshold()
nodes are modified.- Returns:
true
if threshold reached.
-
save
public void save(@Nullable Session session) throws RepositoryException
saves the changes under the given node and resets the counter- Parameters:
session
- the session to save. can benull
- Throws:
RepositoryException
- if an error occurs.
-
getThreshold
public int getThreshold()
Returns the threshold- Returns:
- the threshold
-
setThreshold
public void setThreshold(int threshold)
Sets the threshold- Parameters:
threshold
- the threshold
-
modified
public boolean modified(int num)
Addsnum
modified- Parameters:
num
- number of modified- Returns:
true
if threshold is reached
-
markMissing
public void markMissing(@Nonnull java.lang.String path)
-
markResolved
public void markResolved(@Nonnull java.lang.String path)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-