public abstract class ReadFlowFuture extends AbstractReadFlowFuture<List<DataFlowInfo>> implements RpcOutputGenerator<List<DataFlowInfo>,GetDataFlowOutput>
ReadFlowFuture describes a future associated with the task which
reads data flow information.| Modifier | Constructor and Description |
|---|---|
protected |
ReadFlowFuture(TxContext ctx,
TxQueue txq,
StatsReaderService srs,
GetDataFlowInput input)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearFlowNode()
Clear the physical switch specified by the RPC input.
|
protected void |
clearFlowPort()
Clear the physical switch port specified by the RPC input.
|
protected void |
clearSourceHost()
Clear the source L2 host specified by the RPC input.
|
static ReadFlowFuture |
create(TxContext ctx,
TxQueue txq,
StatsReaderService srs,
GetDataFlowInput input)
Construct a new instance.
|
GetDataFlowOutput |
createOutput(List<DataFlowInfo> result)
Generate the output of the RPC request.
|
protected SalNode |
getFlowNode()
Return a
SalNode instance corresponding to the physical switch
specified by the RPC input. |
protected SalPort |
getFlowPort()
Return a
SalPort instance corresponding to the physical switch
port specified by the RPC input. |
Class<GetDataFlowOutput> |
getOutputType()
Return a class which indicates the type of the RPC output.
|
protected MacVlan |
getSourceHost()
Return a
MacVlan instance corresponding to the source L2 host
specified by the RPC input. |
protected StatsReaderService |
getStatsReaderService()
Return the flow statistics reader service.
|
protected void |
notFound()
Set an empty flow list as the result.
|
protected boolean |
select(FlowCache fc)
Determine whether the given data flow should be selected or not.
|
protected DataFlowInfo |
toDataFlowInfo(FlowCache fc,
VTNFuture<FlowStatsRecord> current)
Convert the given data flow into a
DataFlowInfo instance. |
checkTenant, getTenantName, getTxContext, setFailure, setResultcancel, get, get, isCancelled, isDone, maskCancel, onFutureFailed, onFutureSucceeded, set, setException, setThread, unmaskCanceladdListener, done, getCause, getExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckedGet, checkedGetprotected ReadFlowFuture(TxContext ctx, TxQueue txq, StatsReaderService srs, GetDataFlowInput input) throws VTNException
ctx - A TxContext instance.txq - A TxQueue instance used to update the MD-SAL
datastore.srs - The flow statistics reader service.input - Input of the RPC call.VTNException - An error occurred.public static final ReadFlowFuture create(TxContext ctx, TxQueue txq, StatsReaderService srs, GetDataFlowInput input) throws VTNException
ctx - A TxContext instance.txq - A TxQueue instance used to update the MD-SAL
datastore.srs - The flow statistics reader service.input - Input of the RPC call.ReadFlowFuture instance.VTNException - An error occurred.protected final StatsReaderService getStatsReaderService()
StatsReaderService instance if flow statistics
information needs to be fetched from switches.
Otherwise null.protected final SalNode getFlowNode()
SalNode instance corresponding to the physical switch
specified by the RPC input.SalNode instance or null.protected final SalPort getFlowPort()
SalPort instance corresponding to the physical switch
port specified by the RPC input.SalPort instance or null.protected final MacVlan getSourceHost()
MacVlan instance corresponding to the source L2 host
specified by the RPC input.MacVlan instance or null.protected final void clearFlowNode()
protected final void clearFlowPort()
protected final void clearSourceHost()
protected final void notFound()
protected final boolean select(FlowCache fc)
fc - A FlowCache instance.true if the given data flow should be selected.
Otherwise false.protected final DataFlowInfo toDataFlowInfo(FlowCache fc, VTNFuture<FlowStatsRecord> current)
DataFlowInfo instance.
This method set an exception as the result of this future
if null is returned.
fc - A FlowCache instance.current - A future which will return the current flow statistics
for the given data flow. If null, only flow
statistics cached in fc are used.DataFlowInfo instance on success.
null on failure.public Class<GetDataFlowOutput> getOutputType()
getOutputType in interface RpcOutputGenerator<List<DataFlowInfo>,GetDataFlowOutput>public GetDataFlowOutput createOutput(List<DataFlowInfo> result)
createOutput in interface RpcOutputGenerator<List<DataFlowInfo>,GetDataFlowOutput>result - The result of the RPC main procedure.Copyright © 2018 OpenDaylight. All rights reserved.