public abstract class ReconciliationTask extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected org.opendaylight.yangtools.yang.binding.DataObject |
configData |
protected HwvtepConnectionManager |
connectionManager |
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> |
nodeIid |
protected ReconciliationManager |
reconciliationManager |
Modifier | Constructor and Description |
---|---|
protected |
ReconciliationTask(ReconciliationManager reconciliationManager,
HwvtepConnectionManager connectionManager,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> nodeIid,
org.opendaylight.yangtools.yang.binding.DataObject configData) |
Modifier and Type | Method and Description |
---|---|
abstract void |
checkReadinessAndProcess()
Extended task should implement the logic that check the readiness of the task
for execution.
|
abstract void |
doRetry(boolean wasPreviousAttemptSuccessful)
Extended task should implement the logic that decides whether retry for the task
is required or not.
|
boolean |
equals(Object o) |
int |
hashCode() |
abstract boolean |
reconcileConfiguration(HwvtepConnectionManager connectionManager)
Method contains task reconciliation logic.
|
abstract long |
retryDelayInMills()
Method returns the time interval for retrying the failed task.
|
void |
run() |
String |
toString() |
protected final ReconciliationManager reconciliationManager
protected final HwvtepConnectionManager connectionManager
protected final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> nodeIid
protected final org.opendaylight.yangtools.yang.binding.DataObject configData
protected ReconciliationTask(ReconciliationManager reconciliationManager, HwvtepConnectionManager connectionManager, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> nodeIid, org.opendaylight.yangtools.yang.binding.DataObject configData)
public abstract boolean reconcileConfiguration(HwvtepConnectionManager connectionManager)
ConnectionReconciliationTask.reconcileConfiguration(HwvtepConnectionManager)
for example.connectionManager
- Connection manager to get connection instance of the devicepublic abstract void doRetry(boolean wasPreviousAttemptSuccessful)
ReconciliationManager.enqueue(ReconciliationTask)
.
If retry requires delay, use ReconciliationManager.enqueueForRetry(ReconciliationTask)
and specify the delay using retryDelayInMills()
.
If data store operation is required to decide if the task need retry, please implement
it as an async operation and submit the task on the callback of the future.
Note:Please do not write blocking data store operations
ConnectionReconciliationTask.doRetry(boolean)
wasPreviousAttemptSuccessful
- Status of the previous attemptpublic abstract void checkReadinessAndProcess()
ReconciliationManager.enqueue(ReconciliationTask)
.
If task is not ready for execution yet, enqueue it again for delayed execution
using ReconciliationManager.enqueueForRetry(ReconciliationTask)
.
To check the readiness of the task, if the data store operation is required, please
implement it as an async operation and submit the task on the callback of the future.
Note:Please do not write blocking data store operations
ConnectionReconciliationTask.doRetry(boolean)
public abstract long retryDelayInMills()
doRetry(boolean)
Copyright © 2018 OpenDaylight. All rights reserved.