public final class FailoverService extends Object
| Constructor and Description |
|---|
FailoverService(CoordinatorRegistryCenter regCenter,
String jobName) |
| Modifier and Type | Method and Description |
|---|---|
void |
failoverIfNecessary()
Failover if necessary.
|
List<Integer> |
getFailoveringItems(String jobInstanceId)
Get failovering items.
|
List<Integer> |
getFailoverItems(String jobInstanceId)
Get failover items.
|
List<Integer> |
getLocalFailoverItems()
Get failover items which execute on localhost.
|
List<Integer> |
getLocalTakeOffItems()
Get failover items which crashed on localhost.
|
void |
removeFailoverInfo()
Remove failover info.
|
void |
setCrashedFailoverFlag(int item)
set crashed failover flag.
|
void |
setCrashedFailoverFlagDirectly(int item)
set crashed failover flag directly.
|
void |
updateFailoverComplete(Collection<Integer> items)
Update sharding items status when failover execution complete.
|
public FailoverService(CoordinatorRegistryCenter regCenter, String jobName)
public void setCrashedFailoverFlag(int item)
item - crashed job itempublic void setCrashedFailoverFlagDirectly(int item)
item - crashed itempublic void failoverIfNecessary()
public void updateFailoverComplete(Collection<Integer> items)
items - sharding items of failover execution completedpublic List<Integer> getFailoverItems(String jobInstanceId)
jobInstanceId - job instance IDpublic List<Integer> getFailoveringItems(String jobInstanceId)
jobInstanceId - job instance IDpublic List<Integer> getLocalFailoverItems()
public List<Integer> getLocalTakeOffItems()
public void removeFailoverInfo()
Copyright © 2021 The Apache Software Foundation. All rights reserved.