T
- The type of target virtual node.I
- The type of the identifier for the target virtual node.public abstract class RemoveVirtualNodeTask<T extends org.opendaylight.yangtools.yang.binding.DataObject,I extends VNodeIdentifier<T>> extends DeleteDataTask<T> implements RpcOutputGenerator<VtnUpdateType,Void>
DeleteDataTask
used to remove
the specified virtual node from the MD-SAL datastore.
This task returns a VtnUpdateType
instance that indicates the
result of the task.
VtnUpdateType.REMOVED
null
Modifier | Constructor and Description |
---|---|
protected |
RemoveVirtualNodeTask(I ident)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
Void |
createOutput(VtnUpdateType result)
Generate the output of the RPC request.
|
protected abstract void |
destroy(TxContext ctx,
T current)
Destroy the target virtual node.
|
protected I |
getIdentifier()
Return an identifier for the target virtual node.
|
Class<Void> |
getOutputType()
Return a class which indicates the type of the RPC output.
|
protected void |
onStarted(TxContext ctx,
T current)
Invoked when the MD-SAL datastore transaction has started.
|
void |
onSuccess(VTNManagerProvider provider,
VtnUpdateType result)
Invoked when the task has completed successfully.
|
protected void |
setFlowRemover(FlowRemover fr)
Set a
FlowRemover instance that specifies the flow entries
to be removed. |
execute, onDeleted
getDatastoreType, getTargetPath
needErrorLog
addBackgroundTask, execute, getBackgroundTasks, getMaxRetry, onFailure
protected RemoveVirtualNodeTask(I ident)
ident
- The identifier for the target virtual node.protected final I getIdentifier()
VNodeIdentifier
instance.protected final void setFlowRemover(FlowRemover fr)
FlowRemover
instance that specifies the flow entries
to be removed.fr
- A FlowRemover
instance.protected abstract void destroy(TxContext ctx, T current) throws VTNException
ctx
- A runtime context for transaction task.current
- The virtual node to be removed.VTNException
- An error occurred.protected final void onStarted(TxContext ctx, T current) throws VTNException
onStarted
in class DeleteDataTask<T extends org.opendaylight.yangtools.yang.binding.DataObject>
ctx
- A runtime context for transaction task.current
- The current value at the target path in the MD-SAL
datastore. Note that null
is passed if the
target data is not present.VTNException
- An error occurred.public final Class<Void> getOutputType()
getOutputType
in interface RpcOutputGenerator<VtnUpdateType,Void>
public final Void createOutput(VtnUpdateType result)
createOutput
in interface RpcOutputGenerator<VtnUpdateType,Void>
result
- The result of the RPC main procedure.public final void onSuccess(VTNManagerProvider provider, VtnUpdateType result)
This method of this class does nothing.
onSuccess
in interface TxTask<VtnUpdateType>
onSuccess
in class AbstractTxTask<VtnUpdateType>
provider
- VTN Manager provider service.result
- An object returned by AbstractTxTask.execute(TxContext, int)
.Copyright © 2018 OpenDaylight. All rights reserved.