mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Point checkin. Rough cut at href merge op (don't use it yet though).
Also included abort() method on progress object. What's left: o put incremental update in looping thread(s) to let system bootstrap from nothing o deal with store/webapp going away o deal with virt server down o Switch to using virtualized snapshot instead of HEAD in staging o testing... and lots of it git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6063 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -56,6 +56,7 @@ public class HrefValidationProgress implements Serializable
|
||||
AtomicInteger file_update_count_;
|
||||
AtomicInteger url_update_count_;
|
||||
AtomicBoolean is_done_;
|
||||
AtomicBoolean is_aborted_;
|
||||
|
||||
public HrefValidationProgress()
|
||||
{
|
||||
@@ -64,6 +65,7 @@ public class HrefValidationProgress implements Serializable
|
||||
file_update_count_ = new AtomicInteger();
|
||||
url_update_count_ = new AtomicInteger();
|
||||
is_done_ = new AtomicBoolean( false );
|
||||
is_aborted_ = new AtomicBoolean( false );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,6 +83,25 @@ public class HrefValidationProgress implements Serializable
|
||||
*/
|
||||
public int getDirUpdateCount() { return dir_update_count_.intValue(); }
|
||||
|
||||
/**
|
||||
* Tell the thread that is validating hrefs to abort its current
|
||||
* operation, and cause that operation to declare it "done" and throw
|
||||
* LinkValidationAbortedException.
|
||||
*
|
||||
* Thus, if you have an observer polling progress & checking isDone(),
|
||||
* they'll also see that things are "finished", and can check to see
|
||||
* whether it's because isAborted() is true.
|
||||
*/
|
||||
public void abort()
|
||||
{
|
||||
is_aborted_.set( true );
|
||||
setDone( true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not the validation operation was halted by abort().
|
||||
*/
|
||||
public boolean isAborted() { return is_aborted_.get(); }
|
||||
|
||||
/**
|
||||
* Returns the number of files that have been completely
|
||||
|
Reference in New Issue
Block a user