Package org.elasticsearch.index.shard
Class PrimaryReplicaSyncer.ResyncTask
- java.lang.Object
-
- org.elasticsearch.tasks.Task
-
- org.elasticsearch.index.shard.PrimaryReplicaSyncer.ResyncTask
-
- Enclosing class:
- PrimaryReplicaSyncer
public static class PrimaryReplicaSyncer.ResyncTask extends Task
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrimaryReplicaSyncer.ResyncTask.Status
-
Field Summary
-
Fields inherited from class org.elasticsearch.tasks.Task
X_OPAQUE_ID
-
-
Constructor Summary
Constructors Constructor Description ResyncTask(long id, java.lang.String type, java.lang.String action, java.lang.String description, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
-
Method Summary
Modifier and Type Method Description java.lang.StringgetPhase()Get the current phase of the task.intgetResyncedOperations()number of operations that have been successfully replicatedintgetSkippedOperations()number of translog operations that have been skippedPrimaryReplicaSyncer.ResyncTask.StatusgetStatus()Build a status for this task or null if this task doesn't have status.intgetTotalOperations()total number of translog operations that were captured by translog snapshotvoidsetPhase(java.lang.String phase)Set the current phase of the task.voidsetResyncedOperations(int resyncedOperations)voidsetSkippedOperations(int skippedOperations)voidsetTotalOperations(int totalOperations)-
Methods inherited from class org.elasticsearch.tasks.Task
getAction, getDescription, getHeader, getId, getParentTaskId, getStartTime, getType, result, result, taskInfo, taskInfo
-
-
-
-
Constructor Detail
-
ResyncTask
public ResyncTask(long id, java.lang.String type, java.lang.String action, java.lang.String description, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
-
-
Method Detail
-
setPhase
public void setPhase(java.lang.String phase)
Set the current phase of the task.
-
getPhase
public java.lang.String getPhase()
Get the current phase of the task.
-
getTotalOperations
public int getTotalOperations()
total number of translog operations that were captured by translog snapshot
-
setTotalOperations
public void setTotalOperations(int totalOperations)
-
getResyncedOperations
public int getResyncedOperations()
number of operations that have been successfully replicated
-
setResyncedOperations
public void setResyncedOperations(int resyncedOperations)
-
getSkippedOperations
public int getSkippedOperations()
number of translog operations that have been skipped
-
setSkippedOperations
public void setSkippedOperations(int skippedOperations)
-
getStatus
public PrimaryReplicaSyncer.ResyncTask.Status getStatus()
Description copied from class:TaskBuild a status for this task or null if this task doesn't have status. Since most tasks don't have status this defaults to returning null. While this can never perform IO it might be a costly operation, requiring collating lists of results, etc. So only use it if you need the value.
-
-