Class AutoSave
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.io.AutoSave
-
public class AutoSave extends Object
AutoSave
...
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AutoSave
copy()
int
getThreshold()
Returns the thresholdboolean
isDryRun()
void
markMissing(@NotNull String path)
Deprecated.void
markResolved(@NotNull String path)
Deprecated.boolean
modified(int num)
Addsnum
modifiedboolean
needsSave()
Returnstrue
if more thangetThreshold()
nodes are modified.void
save(@Nullable Session session)
Same assave(Session, boolean)
with the second argument beingtrue
.void
save(@Nullable Session session, boolean isIntermediate)
Saves the changes under the given node and resets the counter.void
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(@Nullable ProgressTracker tracker)
String
toString()
-
-
-
Method Detail
-
copy
public AutoSave copy()
-
setTracker
public void setTracker(@Nullable @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 @Nullable Session session) throws RepositoryException
Same assave(Session, boolean)
with the second argument beingtrue
.- Parameters:
session
-- Throws:
RepositoryException
-
save
public void save(@Nullable @Nullable Session session, boolean isIntermediate) throws RepositoryException
Saves the changes under the given node and resets the counter.- Parameters:
session
- the session to save. can benull
isIntermediate
-false
when this is the final attempt, otherwisetrue
.- 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
@Deprecated public void markMissing(@NotNull @NotNull String path)
Deprecated.As not working reliably it is simply ignored.- Parameters:
path
-
-
markResolved
@Deprecated public void markResolved(@NotNull @NotNull String path)
Deprecated.As not working reliably it is simply ignored.- Parameters:
path
-
-
-