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 classProcess.Reporterstatic classProcess.State
-
Field Summary
Fields Modifier and Type Field Description protected boolean_canceledprotected String_descriptionprotected Exception_exceptionprotected ProgressingFuture<Void>_futureprotected ProcessManager_managerprotected int_progressprotected ProgressReporter_reporter
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels the process.abstract ChangeDataIdgetChangeDataId()StringgetDescription()StringgetErrorMessage()protected abstract ProgressingFuture<Void>getFuture()longgetId()intgetProgress()Process.StategetState()booleanisCanceled()voidpause()Pauses this process.voidresume()Resumes this process if it was paused.voidstartPerforming(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()
-
-