Package com.linkedin.venice.datarecovery
Class DataRecoveryWorker
- java.lang.Object
-
- com.linkedin.venice.datarecovery.DataRecoveryWorker
-
- Direct Known Subclasses:
DataRecoveryEstimator
,DataRecoveryExecutor
,DataRecoveryMonitor
public abstract class DataRecoveryWorker extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
interval
static int
INTERVAL_UNSET
protected java.util.concurrent.ExecutorService
pool
protected int
poolSize
protected java.util.List<DataRecoveryTask>
tasks
-
Constructor Summary
Constructors Constructor Description DataRecoveryWorker()
DataRecoveryWorker(int poolSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DataRecoveryTask>
getTasks()
boolean
needWaitForFirstTaskToComplete(DataRecoveryTask task)
For some task, it is benefit to wait for the first task to complete before starting to run the remaining ones.void
perform(java.util.Set<java.lang.String> storeNames, Command.Params params)
void
processData()
void
shutdownAndAwaitTermination()
-
-
-
Field Detail
-
INTERVAL_UNSET
public static final int INTERVAL_UNSET
- See Also:
- Constant Field Values
-
poolSize
protected final int poolSize
-
interval
protected int interval
-
pool
protected final java.util.concurrent.ExecutorService pool
-
tasks
protected java.util.List<DataRecoveryTask> tasks
-
-
Method Detail
-
getTasks
public java.util.List<DataRecoveryTask> getTasks()
-
needWaitForFirstTaskToComplete
public boolean needWaitForFirstTaskToComplete(DataRecoveryTask task)
For some task, it is benefit to wait for the first task to complete before starting to run the remaining ones. e.g. the first run of task can set up local session files that can be used by follow-up tasks.
-
perform
public void perform(java.util.Set<java.lang.String> storeNames, Command.Params params)
-
processData
public void processData()
-
shutdownAndAwaitTermination
public void shutdownAndAwaitTermination()
-
-