com.day.jcr.vault.fs.io
Class AutoSave

java.lang.Object
  extended by com.day.jcr.vault.fs.io.AutoSave

public class AutoSave
extends Object

AutoSave...


Constructor Summary
AutoSave()
           
AutoSave(int threshold)
           
 
Method Summary
 AutoSave copy()
           
 int getThreshold()
          Returns the threshold
 boolean isDryRun()
           
 void markMissing(String path)
           
 void markResolved(String path)
           
 boolean modified(int num)
          Adds num modified
 boolean needsSave()
          Returns true if more than getThreshold() nodes are modified.
 void save(Session session)
          saves the changes under the given node and resets the counter
 void setDebugFailEach(int debugFailEach)
          Debug settings to allows to produce failures after each debugFailEach save.
 void setDryRun(boolean dryRun)
           
 void setThreshold(int threshold)
          Sets the threshold
 void setTracker(ProgressTracker tracker)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoSave

public AutoSave()

AutoSave

public AutoSave(int threshold)
Method Detail

copy

public AutoSave copy()

setTracker

public void setTracker(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 each debugFailEach save.

Parameters:
debugFailEach - cardinal indicating when to fail

needsSave

public boolean needsSave()
Returns true if more than getThreshold() nodes are modified.

Returns:
true if threshold reached.

save

public void save(Session session)
          throws RepositoryException
saves the changes under the given node and resets the counter

Parameters:
session - the session to save. can be null
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)
Adds num modified

Parameters:
num - number of modified
Returns:
true if threshold is reached

markMissing

public void markMissing(String path)

markResolved

public void markResolved(String path)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.