public final class TxQueueImpl extends Object implements TxQueue, Runnable, AutoCloseable
TxQueue.
MD-SAL datastore transaction may fail if the same data tree is modified by multiple transactions concurrently. This class is used to serialize modification to the same MD-SAL data tree. An instance of this class has a single transaction queue and runner thread. Queued transactions are executed sequentially on the runner thread.
TxTask| Constructor and Description |
|---|
TxQueueImpl(String name,
VTNManagerProvider provider)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this transaction queue.
|
<T> VTNFuture<T> |
post(TxTask<T> task)
Post a new transaction.
|
<T> VTNFuture<T> |
postFirst(TxTask<T> task)
Post a new transaction.
|
void |
run()
Main routine of the runner thread.
|
void |
start()
Start the transaction queue processing.
|
public TxQueueImpl(String name, VTNManagerProvider provider)
name - The name of this queue.provider - A VTNManagerProvider service instance.public void start()
public <T> VTNFuture<T> postFirst(TxTask<T> task)
This method put the given task at the head of the transaction queue.
public void close()
close in interface AutoCloseableCopyright © 2018 OpenDaylight. All rights reserved.