public class ConnectionReconciliationTask extends ReconciliationTask
configData, connectionManager, nodeIid, reconciliationManager
Constructor and Description |
---|
ConnectionReconciliationTask(ReconciliationManager reconciliationManager,
OvsdbConnectionManager connectionManager,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> nodeIid,
org.opendaylight.yangtools.yang.binding.DataObject configData) |
Modifier and Type | Method and Description |
---|---|
void |
checkReadinessAndProcess()
Extended task should implement the logic that check the readiness of the task
for execution.
|
void |
doRetry(boolean wasLastAttemptSuccessful)
Extended task should implement the logic that decides whether retry for the task
is required or not.
|
boolean |
reconcileConfiguration(OvsdbConnectionManager connectionManagerOfDevice)
Method contains task reconciliation logic.
|
long |
retryDelayInMills()
Method returns the time interval for retrying the failed task.
|
equals, hashCode, run, toString
public ConnectionReconciliationTask(ReconciliationManager reconciliationManager, OvsdbConnectionManager connectionManager, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> nodeIid, org.opendaylight.yangtools.yang.binding.DataObject configData)
public boolean reconcileConfiguration(OvsdbConnectionManager connectionManagerOfDevice)
ReconciliationTask
reconcileConfiguration(OvsdbConnectionManager)
for example.reconcileConfiguration
in class ReconciliationTask
connectionManagerOfDevice
- Connection manager to get connection instance of the devicepublic void doRetry(boolean wasLastAttemptSuccessful)
ReconciliationTask
ReconciliationManager.enqueue(ReconciliationTask)
.
If retry requires delay, use ReconciliationManager.enqueueForRetry(ReconciliationTask)
and specify the delay using ReconciliationTask.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
doRetry(boolean)
doRetry
in class ReconciliationTask
wasLastAttemptSuccessful
- Status of the previous attemptpublic void checkReadinessAndProcess()
ReconciliationTask
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
doRetry(boolean)
checkReadinessAndProcess
in class ReconciliationTask
public long retryDelayInMills()
ReconciliationTask
ReconciliationTask.doRetry(boolean)
retryDelayInMills
in class ReconciliationTask
Copyright © 2018 OpenDaylight. All rights reserved.