org.duraspace.fcrepo.cloudsync.service.backend
Class TaskRunner
java.lang.Object
java.lang.Thread
org.duraspace.fcrepo.cloudsync.service.backend.TaskRunner
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- CopyTaskRunner, ListTaskRunner
public abstract class TaskRunner
- extends Thread
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
task
protected final Task task
taskDao
protected final TaskDao taskDao
objectSetDao
protected final ObjectSetDao objectSetDao
objectStoreDao
protected final ObjectStoreDao objectStoreDao
logWriter
protected final PrintWriter logWriter
completionListener
protected final TaskCompletionListener completionListener
pauseRequested
protected boolean pauseRequested
resumeRequested
protected boolean resumeRequested
cancelRequested
protected boolean cancelRequested
TaskRunner
protected TaskRunner(Task task,
TaskDao taskDao,
ObjectSetDao objectSetDao,
ObjectStoreDao objectStoreDao,
PrintWriter logWriter,
TaskCompletionListener completionListener)
getInstance
public static final TaskRunner getInstance(Task task,
TaskDao taskDao,
ObjectSetDao objectSetDao,
ObjectStoreDao objectStoreDao,
PrintWriter logWriter,
TaskCompletionListener completionListener,
HttpClientConfig httpClientConfig)
run
public final void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
runTask
protected abstract void runTask()
throws Exception
- Throws:
Exception
pauseOrCancelIfRequested
protected void pauseOrCancelIfRequested()
throws TaskCanceledException
- Throws:
TaskCanceledException
getTask
public Task getTask()
requestPause
public void requestPause()
requestResume
public void requestResume()
requestCancel
public void requestCancel()
getRelatedSetIds
public abstract Set<String> getRelatedSetIds()
getRelatedStoreIds
public abstract Set<String> getRelatedStoreIds()
Copyright © 2012 DuraSpace. All Rights Reserved.