mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
APPS-832: address PR comment
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package org.alfresco.util;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.alfresco.repo.lock.JobLockService.JobLockRefreshCallback;
|
||||
|
||||
public class LockCallback implements JobLockRefreshCallback
|
||||
{
|
||||
private final AtomicBoolean running = new AtomicBoolean(true);
|
||||
|
||||
@Override
|
||||
public boolean isActive()
|
||||
{
|
||||
return running.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lockReleased()
|
||||
{
|
||||
running.set(false);
|
||||
}
|
||||
|
||||
public void setIsRunning(boolean isRunning)
|
||||
{
|
||||
this.running.set(isRunning);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user