public final class PutFlowTxTask extends AbstractTxTask<VtnDataFlow>
PutFlowTxTask describes the MD-SAL datastore transaction task that
installs a new VTN flow information into the datastore.
This task returns a VtnDataFlow instance corresponding to a new
VTN data flow.
| Constructor and Description |
|---|
PutFlowTxTask(FlowAddContext ctx,
VTNThreadPool thread,
TxQueue txq)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
VtnDataFlow |
execute(TxContext ctx)
Modify the MD-SAL datastore using the given transaction.
|
protected int |
getMaxRetry()
Return the number of times for retrying transaction.
|
void |
onFailure(VTNManagerProvider provider,
Throwable t)
Invoked when the task has failed.
|
void |
onSuccess(VTNManagerProvider provider,
VtnDataFlow result)
Invoked when the task has completed successfully.
|
addBackgroundTask, execute, getBackgroundTasksclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAsync, needErrorLogpublic PutFlowTxTask(FlowAddContext ctx, VTNThreadPool thread, TxQueue txq)
ctx - A FlowAddContext instance.thread - A VTNThreadPool instance used to install flow
entries.txq - A TxQueue instance that runs this task.protected int getMaxRetry()
This method in this class returns MAX_FLOW_RETRY.
getMaxRetry in class AbstractTxTask<VtnDataFlow>public VtnDataFlow execute(TxContext ctx) throws VTNException
Note that this method may be called more than once when a MD-SAL datastore transaction is aborted due to data conflict.
execute in class AbstractTxTask<VtnDataFlow>ctx - A runtime context for transaction task.VTNException - An error occurred.public void onSuccess(VTNManagerProvider provider, VtnDataFlow result)
onSuccess in interface TxTask<VtnDataFlow>onSuccess in class AbstractTxTask<VtnDataFlow>provider - VTN Manager provider service.result - The result of this task.public void onFailure(VTNManagerProvider provider, Throwable t)
onFailure in interface TxTask<VtnDataFlow>onFailure in class AbstractTxTask<VtnDataFlow>provider - VTN Manager provider service.t - A Throwable thrown by the task.Copyright © 2018 OpenDaylight. All rights reserved.