public interface VTNManagerProvider extends AutoCloseable, Executor, TxQueue, FlowRpcWatcher
Modifier and Type | Method and Description |
---|---|
VTNFuture<VtnFlowId> |
addFlow(VTNFlowBuilder builder)
Add the given VTN data flow.
|
void |
close()
Close the VTN Manager provider service.
|
boolean |
executeTask(Runnable task)
Execute the specified task asynchronously.
|
org.opendaylight.controller.md.sal.binding.api.DataBroker |
getDataBroker()
Return a data broker service instance.
|
com.google.common.base.Optional<org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipState> |
getOwnershipState(org.opendaylight.controller.md.sal.common.api.clustering.Entity ent)
Return the current ownership state information about the given entity.
|
RouteResolver |
getRouteResolver()
Return the packet route resolver associated with the system default
routing policy.
|
RouteResolver |
getRouteResolver(Integer id)
Return a packet route resolver.
|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
getRpcService(Class<T> type)
Return an implementation of the specified RPC service.
|
VTNTimer |
getTimer()
Return the global timer.
|
VTNConfig |
getVTNConfig()
Return a
VTNConfig instance that contains current configuration. |
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
getVtnRpcService(Class<T> type)
Return an implementation of the RPC service provided by the VTN Manager.
|
boolean |
isOwner(VTNEntityType etype)
Determine whether this process process is the owner of the given
global entity.
|
TxContext |
newTxContext()
Create a new read-only MD-SAL datastore transaction context.
|
<T> VTNFuture<T> |
postSync(TxTask<T> task)
Post a new MD-SAL transaction task.
|
void |
publish(org.opendaylight.yangtools.yang.binding.Notification n)
Publish the given MD-SAL notification.
|
org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipCandidateRegistration |
registerEntity(org.opendaylight.controller.md.sal.common.api.clustering.Entity ent)
Register a candidate for ownership of the given entity.
|
org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListenerRegistration |
registerListener(VTNEntityType etype,
org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener listener)
Register a listener that listens the ownership status of the entity
specified by the given type.
|
VTNFuture<Void> |
removeFlows(FlowRemover remover)
Remove flow entries that match the given condition.
|
<T> void |
setCallback(Future<T> future,
com.google.common.util.concurrent.FutureCallback<? super T> cb)
Set the given future callback to the given future.
|
void |
transmit(List<org.apache.commons.lang3.tuple.Pair<SalPort,Packet>> packets)
Transmit all the given packets.
|
void |
transmit(SalPort egress,
Packet packet)
Transmit the given packet.
|
registerRpc, unregisterRpc
asyncBarrier
VTNConfig getVTNConfig()
VTNConfig
instance that contains current configuration.VTNConfig
instance.TxContext newTxContext()
VTNTimer getTimer()
boolean executeTask(Runnable task)
task
- A task to be executed on this thread pool.true
is returned if the specified task was submitted.
false
is returned if the specified tas was rejected.NullPointerException
- task
is null
.<T> void setCallback(Future<T> future, com.google.common.util.concurrent.FutureCallback<? super T> cb)
If the given future implements ListenableFuture
, this method
adds the given callback to the given future, and the callback will
be invoked by a thread which is executing the future.
If not, the given callback will be invoked on another thread
asynchronously.
T
- The type of the object returned by the given future.future
- A Future
instance to wait for its completion.cb
- A FutureCallback
instance.org.opendaylight.controller.md.sal.binding.api.DataBroker getDataBroker()
DataBroker
instance.void transmit(List<org.apache.commons.lang3.tuple.Pair<SalPort,Packet>> packets)
packets
- A list of packets to transmit.
The left of each elements indicates the egress switch
port, and the right indiciates a packet to transmit.RouteResolver getRouteResolver()
RouteResolver
instance on success.
null
if the routing management is already closed.RouteResolver getRouteResolver(Integer id)
id
- The identifier of the path policy.RouteResolver
instance if found.
null
if not fonud.VTNFuture<VtnFlowId> addFlow(VTNFlowBuilder builder)
builder
- A VTNFlowBuilder
instance which contains
data flow to be installed.VTNFuture<Void> removeFlows(FlowRemover remover)
remover
- A FlowRemover
instance which determines VTN data
flows to be removed.org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipCandidateRegistration registerEntity(org.opendaylight.controller.md.sal.common.api.clustering.Entity ent) throws org.opendaylight.controller.md.sal.common.api.clustering.CandidateAlreadyRegisteredException
ent
- The entity to be registered as a candidate of ownership.EntityOwnershipCandidateRegistration
instance.org.opendaylight.controller.md.sal.common.api.clustering.CandidateAlreadyRegisteredException
- The given entity is already registered.org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListenerRegistration registerListener(VTNEntityType etype, org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener listener)
etype
- The type of the VTN global entity.listener
- An EntityOwnershipListener
instance.EntityOwnershipListenerRegistration
instance.com.google.common.base.Optional<org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipState> getOwnershipState(org.opendaylight.controller.md.sal.common.api.clustering.Entity ent)
ent
- The entity to query.Optional
instance that contains the entity ownership
state if present.boolean isOwner(VTNEntityType etype)
etype
- The type of VTN global entity.
Specifying non-global entity type results in undefined
behavior.true
if this process is the owner of the given global
entity. false
otherwise.<T extends org.opendaylight.yangtools.yang.binding.RpcService> T getRpcService(Class<T> type) throws VTNException
T
- The type of the RPC service.type
- A class which specifies the RPC service.VTNException
- The specified RPC service was not found.<T extends org.opendaylight.yangtools.yang.binding.RpcService> T getVtnRpcService(Class<T> type) throws VTNException
T
- The type of the RPC service.type
- A class which specifies the RPC service.VTNException
- The specified RPC service was not found.void publish(org.opendaylight.yangtools.yang.binding.Notification n)
n
- A Notification
instance to be published.<T> VTNFuture<T> postSync(TxTask<T> task)
This method associates a new VTNFuture
instance with the
given task, including all background tasks started by the task.
Note that the given task is never canceled even if the returned
VTNFuture
is cancelled. Future.cancel(boolean)
on
the returned value only cancels the wait for background tasks.
void close()
close
in interface AutoCloseable
Copyright © 2018 OpenDaylight. All rights reserved.