import java.util.Map;
import java.util.Set;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
-public interface DataChange<P/* extends Path<P> */, D> {
+public interface DataChange<P extends Path<P>, D> {
/**
* Returns a map of paths and newly created objects
- *
+ *
* @return map of paths and newly created objects
*/
Map<P, D> getCreatedOperationalData();
/**
* Returns a map of paths and newly created objects
- *
+ *
* @return map of paths and newly created objects
*/
Map<P, D> getCreatedConfigurationData();
/**
* Returns a map of paths and respective updated objects after update.
- *
+ *
* Original state of the object is in
* {@link #getOriginalOperationalData()}
- *
+ *
* @return map of paths and newly created objects
*/
Map<P, D> getUpdatedOperationalData();
/**
* Returns a map of paths and respective updated objects after update.
- *
+ *
* Original state of the object is in
* {@link #getOriginalConfigurationData()}
- *
+ *
* @return map of paths and newly created objects
*/
Map<P, D> getUpdatedConfigurationData();
/**
* Returns a set of paths of removed objects.
- *
+ *
* Original state of the object is in
* {@link #getOriginalConfigurationData()}
- *
+ *
* @return map of paths and newly created objects
*/
Set<P> getRemovedConfigurationData();
/**
* Returns a set of paths of removed objects.
- *
+ *
* Original state of the object is in
* {@link #getOriginalOperationalData()}
- *
+ *
* @return map of paths and newly created objects
*/
Set<P> getRemovedOperationalData();
/**
* Return a map of paths and original state of updated and removed objectd.
- *
+ *
* @return map of paths and original state of updated and removed objectd.
*/
Map<P, D> getOriginalConfigurationData();
/**
* Return a map of paths and original state of updated and removed objectd.
- *
+ *
* @return map of paths and original state of updated and removed objectd.
*/
Map<P, D> getOriginalOperationalData();
package org.opendaylight.controller.md.sal.common.api.data;
import org.opendaylight.yangtools.concepts.Immutable;
+import org.opendaylight.yangtools.concepts.Path;
-public interface DataChangeEvent<P,D> extends DataChange<P, D>, Immutable {
+public interface DataChangeEvent<P extends Path<P>,D> extends DataChange<P, D>, Immutable {
/**
* Returns a orignal subtree of data, which starts at the path
* where listener was registered.
- *
+ *
*/
D getOriginalConfigurationSubtree();
/**
* Returns a new subtree of data, which starts at the path
* where listener was registered.
- *
+ *
*/
D getOriginalOperationalSubtree();
-
-
-
+
+
+
/**
* Returns a updated subtree of data, which starts at the path
* where listener was registered.
- *
+ *
*/
D getUpdatedConfigurationSubtree();
/**
* Returns a udpated subtree of data, which starts at the path
* where listener was registered.
- *
+ *
*/
D getUpdatedOperationalSubtree();
}
import java.util.EventListener;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
-public interface DataChangeListener<P/* extends Path<P> */,D> extends EventListener {
+public interface DataChangeListener<P extends Path<P>, D> extends EventListener {
void onDataChanged(DataChangeEvent<P, D> change);
}
*/
package org.opendaylight.controller.md.sal.common.api.data;
-
import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.concepts.Path;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
-public interface DataChangePublisher<P/* extends Path<P> */,D, L extends DataChangeListener<P,D>> {
+public interface DataChangePublisher<P extends Path<P>, D, L extends DataChangeListener<P,D>> {
ListenerRegistration<L> registerDataChangeListener(P path, L listener);
package org.opendaylight.controller.md.sal.common.api.data;
import org.opendaylight.controller.sal.common.DataStoreIdentifier;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
import org.opendaylight.yangtools.yang.common.RpcResult;
/**
* Two phase commit handler (cohort) of the two-phase commit protocol of data.
- *
+ *
* <p>
* The provider should expose the implementation of DataCommitHandler if it's
* functionality depends on any subset of data stored in data repositories, in
* order to participate in {@link DataBrokerService#commit(DataStoreIdentifier)
* operation.
- *
+ *
* <p>
* Operations of two-phase commit handlers should not change data in data store,
* this is responsibility of the coordinator (broker or some component of the
* broker).
- *
+ *
* The commit handlers are responsible for changing the internal state of the
* provider to reflect the commited changes in data.
- *
+ *
* <h3>Two-phase commit</h3>
- *
+ *
* <h4>Commit Request Phase</h4>
- *
+ *
* <ol>
* <li> <code>Consumer</code> edits data by invocation of
* <code>DataBrokerService.editCandidateData(DataStoreIdentifier, DataRoot)</code>
* </ol>
* <li><code>Broker</code> starts a commit finish phase
* </ol>
- *
+ *
* <h4>Commit Finish Phase</h4>
- *
+ *
* <ol>
* <li>For each <code>CommitTransaction</code> from Commit Request phase
* <ol>
* <li>If error occured, the broker starts a commit rollback phase.
* </ul>
* </ol>
- *
+ *
* <h4>Commit Rollback Phase</h4>
* <li>For each <code>DataCommitTransaction</code> from Commit Request phase
* <ol>
* <li>The provider rollbacks a commit and returns an {@link RpcResult} of
* rollback. </ol>
* <li>Broker returns a error result to the consumer.
- *
+ *
* @param <P> Class representing a path
* @param <D> Superclass from which all data objects are derived from.
*/
-public interface DataCommitHandler<P/* extends Path<P> */,D> {
+public interface DataCommitHandler<P extends Path<P>, D> {
+
-
DataCommitTransaction<P, D> requestCommit(DataModification<P,D> modification);
- public interface DataCommitTransaction<P/* extends Path<P> */,D> {
+ public interface DataCommitTransaction<P extends Path<P>, D> {
DataModification<P,D> getModification();
/**
- *
+ *
* Finishes a commit.
- *
+ *
* This callback is invoked by commit coordinator to finish commit action.
- *
+ *
* The implementation is required to finish transaction or return unsuccessful
* rpc result if something went wrong.
- *
+ *
* The provider (commit handler) should apply all changes to its state
* which are a result of data change-
- *
+ *
* @return
*/
RpcResult<Void> finish() throws IllegalStateException;
/**
* Rollbacks a commit.
- *
+ *
* This callback is invoked by commit coordinator to finish commit action.
- *
+ *
* The provider (commit handler) should rollback all changes to its state
* which were a result of previous request commit.
- *
+ *
* @return
* @throws IllegalStateException
* If the method is invoked after {@link #finish()}
import java.util.concurrent.Future;
import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
+import org.opendaylight.yangtools.concepts.Path;
import org.opendaylight.yangtools.yang.common.RpcResult;
-//FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-//import org.opendaylight.yangtools.concepts.Path;
-public interface DataModification<P/* extends Path<P> */, D> extends DataChange<P, D>, DataReader<P, D> {
+public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>, DataReader<P, D> {
/**
* Returns transaction identifier
*/
package org.opendaylight.controller.md.sal.common.api.data;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
-public interface DataModificationTransactionFactory<P/* extends Path<P> */,D> {
+public interface DataModificationTransactionFactory<P extends Path<P> ,D> {
DataModification<P, D> beginTransaction();
}
*/
package org.opendaylight.controller.md.sal.common.api.data;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
-public interface DataProvider<P/* extends Path<P> */,D> extends DataReader<P, D> {
+public interface DataProvider<P extends Path<P>, D> extends DataReader<P, D> {
}
*/
package org.opendaylight.controller.md.sal.common.api.data;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
/**
* Reader for reading YANG subtrees based on their path.
- *
+ *
* Reader is requested to return object at specified path and all it's subnodes
* known to the reader or null if node is not found in this reader.
*
* @param <P> Path Type
* @param <D> Data Type
*/
-public interface DataReader<P/* extends Path<P> */,D> {
+public interface DataReader<P extends Path<P> ,D> {
/**
* Reads data from Operational data store located at provided path
- *
+ *
* @param path Path to data
* @return
*/
*/
package org.opendaylight.controller.md.sal.common.api.data;
-public interface DataStore<P, D> extends //
+import org.opendaylight.yangtools.concepts.Path;
+
+public interface DataStore<P extends Path<P>, D> extends //
DataReader<P, D>, //
DataModificationTransactionFactory<P, D> {
*/
package org.opendaylight.controller.md.sal.common.api.data;
+import org.opendaylight.yangtools.concepts.Path;
+
/**
* A chain of transactions. Transactions in a chain need to be committed in sequence and each
* transaction should see the effects of previous transactions as if they happened. A chain
* makes no guarantees of atomicity, in fact transactions are committed as soon as possible.
*/
-public interface TransactionChain<P/* extends Path<P> */, D> extends AutoCloseable {
+public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable {
/**
* Create a new transaction which will continue the chain. The previous transaction
* has to be either COMMITTED or CANCELLED.
*/
package org.opendaylight.controller.md.sal.common.api.data;
+import org.opendaylight.yangtools.concepts.Path;
+
/**
* Interface for creating transaction chains.
*/
-public interface TransactionChainFactory<P/* extends Path<P> */, D> {
+public interface TransactionChainFactory<P extends Path<P>, D> {
/**
* Create a new transaction chain. The chain will be initialized to read
* from its backing datastore, with no outstanding transaction. Listener
package org.opendaylight.controller.md.sal.common.api.routing;
import org.opendaylight.yangtools.concepts.Mutable;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
-public interface MutableRoutingTable<C,P/* extends Path<P> */,T> extends RoutingTable<C,P,T>, Mutable {
+public interface MutableRoutingTable<C, P extends Path<P>, T> extends RoutingTable<C,P,T>, Mutable {
void setDefaultRoute(T target);
void updateRoute(P path,T target);
*/
package org.opendaylight.controller.md.sal.common.api.routing;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
import org.opendaylight.yangtools.concepts.Registration;
-public interface RoutedRegistration<C,P/* extends Path<P> */,S> extends Registration<S> {
+public interface RoutedRegistration<C, P extends Path<P>, S> extends Registration<S> {
void registerPath(C context, P path);
void unregisterPath(C context, P path);
import java.util.Map;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
-public interface RoutingTable<C,P/* extends Path<P> */,T> {
+public interface RoutingTable<C, P extends Path<P>, T> {
C getIdentifier();