public final class AddFlowStatsTask extends AbstractTxTask<Boolean>
AddFlowStatsTask describes the MD-SAL datastore transaction task
that adds the given flow statistics history record to the VTN data flow.
This task returns Boolean.TRUE if the given flow statistics was
added successfully.
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG
Logger instance.
|
| Constructor and Description |
|---|
AddFlowStatsTask(String tname,
VtnFlowId fid,
FlowStatsRecord fsr)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
execute(TxContext ctx)
Modify the MD-SAL datastore using the given transaction.
|
void |
onFailure(VTNManagerProvider provider,
Throwable t)
Invoked when the task has failed.
|
void |
onSuccess(VTNManagerProvider provider,
Boolean result)
Invoked when the task has completed successfully.
|
addBackgroundTask, execute, getBackgroundTasks, getMaxRetryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAsync, needErrorLogpublic AddFlowStatsTask(String tname, VtnFlowId fid, FlowStatsRecord fsr)
tname - The name of the target VTN.fid - The identifier of the target VTN data flow.fsr - The flow statistics record to be added.public Boolean 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<Boolean>ctx - A runtime context for transaction task.VTNException - An error occurred.public void onSuccess(VTNManagerProvider provider, Boolean result)
public void onFailure(VTNManagerProvider provider, Throwable t)
Copyright © 2018 OpenDaylight. All rights reserved.