Package org.openrefine.process
Class Process
- java.lang.Object
-
- org.openrefine.process.Process
-
- Direct Known Subclasses:
FileChangeDataStore.ChangeDataStoringProcess
public abstract class Process extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Process.Reporter
static class
Process.State
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_canceled
protected String
_description
protected Exception
_exception
protected ProgressingFuture<Void>
_future
protected ProcessManager
_manager
protected int
_progress
protected ProgressReporter
_reporter
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the process.abstract ChangeDataId
getChangeDataId()
String
getDescription()
String
getErrorMessage()
protected abstract ProgressingFuture<Void>
getFuture()
long
getId()
int
getProgress()
Process.State
getState()
boolean
isCanceled()
void
pause()
Pauses this process.void
resume()
Resumes this process if it was paused.void
startPerforming(ProcessManager manager)
-
-
-
Field Detail
-
_description
protected final String _description
-
_manager
protected ProcessManager _manager
-
_future
protected ProgressingFuture<Void> _future
-
_progress
protected int _progress
-
_canceled
protected boolean _canceled
-
_exception
protected Exception _exception
-
_reporter
protected ProgressReporter _reporter
-
-
Constructor Detail
-
Process
public Process(String description)
-
-
Method Detail
-
getState
public Process.State getState()
-
isCanceled
public boolean isCanceled()
-
startPerforming
public void startPerforming(ProcessManager manager)
-
getErrorMessage
public String getErrorMessage()
-
getDescription
public String getDescription()
-
getProgress
public int getProgress()
-
cancel
public void cancel()
Cancels the process. Note that callingProcessManager.update()
after this cancellation is required for any other process in the queue to start.
-
pause
public void pause()
Pauses this process. This may or may not be actually respected by the underlying future as support depends on the runner.
-
resume
public void resume()
Resumes this process if it was paused.
-
getId
public long getId()
-
getChangeDataId
public abstract ChangeDataId getChangeDataId()
-
getFuture
protected abstract ProgressingFuture<Void> getFuture()
-
-