From 255e7b89a8b24fb597fac63172bd1a6e139f21dc Mon Sep 17 00:00:00 2001 From: R P Karthika Date: Wed, 29 Apr 2020 15:26:46 +0530 Subject: [PATCH] Fix javadoc failures in genius Fixing javadoc failures post MDSAL-API migration. Change-Id: I9e6c5408c5f132006bc0c737a0980ac0fe6425c8 Signed-off-by: Nidhi Adhvaryu Signed-off-by: Apurba Mukherjee Signed-off-by: R P Karthika --- .../globals/InterfaceServiceUtil.java | 4 +- .../genius/itm/impl/ItmUtils.java | 2 +- .../DataTreeEventCallbackRegistrar.java | 13 +++++-- .../infra/ManagedNewTransactionRunner.java | 10 +++-- .../infra/ManagedTransactionFactory.java | 24 +++++++++--- .../genius/infra/TypedReadTransaction.java | 7 ++-- .../genius/infra/TypedWriteTransaction.java | 16 +++----- .../genius/mdsalutil/MDSALUtil.java | 27 ++++++++++++++ .../genius/mdsalutil/MetaDataUtil.java | 6 +++ .../opendaylight/genius/mdsalutil/NWUtil.java | 5 +++ .../interfaces/IMdsalApiManager.java | 37 +++++++++++++++++++ .../genius/mdsalutil/packet/ICMP.java | 2 + .../batching/ResourceBatchingManager.java | 1 + .../utils/hwvtep/HwvtepSouthboundUtils.java | 3 ++ .../genius/utils/hwvtep/HwvtepUtils.java | 30 +++++++++++++++ .../testutils/DataBrokerFailures.java | 12 +++--- 16 files changed, 162 insertions(+), 37 deletions(-) diff --git a/interfacemanager/interfacemanager-api/src/main/java/org/opendaylight/genius/interfacemanager/globals/InterfaceServiceUtil.java b/interfacemanager/interfacemanager-api/src/main/java/org/opendaylight/genius/interfacemanager/globals/InterfaceServiceUtil.java index 18dce29cc..8c4266301 100644 --- a/interfacemanager/interfacemanager-api/src/main/java/org/opendaylight/genius/interfacemanager/globals/InterfaceServiceUtil.java +++ b/interfacemanager/interfacemanager-api/src/main/java/org/opendaylight/genius/interfacemanager/globals/InterfaceServiceUtil.java @@ -55,7 +55,7 @@ public final class InterfaceServiceUtil { /** * Build a service information structure. * - * @deprecated Use {@link #buildServiceInfo(String, int)}. + * @deprecated Use {@link #buildServiceInfo(String, Uint8)}. */ @Deprecated public static ServicesInfo buildServiceInfo(String serviceName, short serviceIndex, Uint8 servicePriority, @@ -66,7 +66,7 @@ public final class InterfaceServiceUtil { /** * Build a service information structure. * - * @deprecated Use {@link #buildServiceInfo(String, int)}. + * @deprecated Use {@link #buildServiceInfo(String, Uint8)}. */ @Deprecated public static ServicesInfo buildServiceInfo(String serviceName, short serviceIndex, Uint8 servicePriority, diff --git a/itm/itm-impl/src/main/java/org/opendaylight/genius/itm/impl/ItmUtils.java b/itm/itm-impl/src/main/java/org/opendaylight/genius/itm/impl/ItmUtils.java index da4cd4d16..7cf28aa1b 100644 --- a/itm/itm-impl/src/main/java/org/opendaylight/genius/itm/impl/ItmUtils.java +++ b/itm/itm-impl/src/main/java/org/opendaylight/genius/itm/impl/ItmUtils.java @@ -228,7 +228,7 @@ public final class ItmUtils { /** * Asynchronous non-blocking bulk delete to data store. * - * @deprecated Use {@link ManagedNewTransactionRunner} instead of this. + * @deprecated Use {@link org.opendaylight.genius.infra.ManagedNewTransactionRunner} instead of this. */ /*@Deprecated public static void asyncBulkRemove(final DataBroker broker, diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/datastoreutils/listeners/DataTreeEventCallbackRegistrar.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/datastoreutils/listeners/DataTreeEventCallbackRegistrar.java index 30ddf4f8e..814618264 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/datastoreutils/listeners/DataTreeEventCallbackRegistrar.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/datastoreutils/listeners/DataTreeEventCallbackRegistrar.java @@ -106,6 +106,7 @@ public interface DataTreeEventCallbackRegistrar { BiFunction<@Nullable T, T, NextAction> callback, Duration timeoutDuration, Consumer> timedOutCallback); + /** * Call back when expected instance was added or updated, with NextAction support. * @param store the expected data store @@ -113,15 +114,19 @@ public interface DataTreeEventCallbackRegistrar { * @param callback the callback as {@link BiFunction}, where the first argument is the data before the update * or null in case of an add, the second argument is the data after the update (or add; never null), * and the returned value determines whether to keep listening for changes or not anymore. + * @param DataObject subclass */ void onAddOrUpdate(LogicalDatastoreType store, InstanceIdentifier path, BiFunction<@Nullable T, T, NextAction> callback); /** - * Call back when expected instance was added or updated, with implicit {@link NextAction#UNREGISTER}. - * See {@link #onAddOrUpdate(LogicalDatastoreType, InstanceIdentifier, BiFunction)} for more details. - * @param - * DataObject subclass + * Call back when expected instance was added or updated, with NextAction support. + * @param store the expected data store + * @param path the path to watch for changes on + * @param callback the callback as {@link BiFunction}, where the first argument is the data before the update + * or null in case of an add, the second argument is the data after the update (or add; never null), + * and the returned value determines whether to keep listening for changes or not anymore. + * @param DataObject subclass */ default void onAddOrUpdate(LogicalDatastoreType store, InstanceIdentifier path, BiConsumer<@Nullable T, T> callback) { diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedNewTransactionRunner.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedNewTransactionRunner.java index 5fa7f9d10..ded965af3 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedNewTransactionRunner.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedNewTransactionRunner.java @@ -42,7 +42,7 @@ public interface ManagedNewTransactionRunner extends ManagedTransactionFactory { * *

The consumer should not (cannot) itself use * {@link WriteTransaction#cancel()}, or - * {@link WriteTransaction#submit()} (it will throw an {@link UnsupportedOperationException}). + * (it will throw an {@link UnsupportedOperationException}). * *

This is an asynchronous API, like {@link DataBroker}'s own; * when returning from this method, the operation of the Transaction may well still be ongoing in the background, @@ -55,8 +55,9 @@ public interface ManagedNewTransactionRunner extends ManagedTransactionFactory { * (but better NOT by using the blocking {@link Future#get()} on it). * * @param txConsumer the {@link CheckedConsumer} that needs a new write only transaction - * @return the {@link ListenableFuture} returned by {@link WriteTransaction#submit()}, + * @return the {@link ListenableFuture} returned by , * or a failed future with an application specific exception (not from submit()) + * @param Exception subclass */ @CheckReturnValue @Deprecated @@ -72,7 +73,7 @@ public interface ManagedNewTransactionRunner extends ManagedTransactionFactory { * *

The consumer should not (cannot) itself use * {@link ReadWriteTransaction#cancel()}, or - * {@link ReadWriteTransaction#submit()} (it will throw an {@link UnsupportedOperationException}). + * (it will throw an {@link UnsupportedOperationException}). * *

This is an asynchronous API, like {@link DataBroker}'s own; * when returning from this method, the operation of the Transaction may well still be ongoing in the background, @@ -85,8 +86,9 @@ public interface ManagedNewTransactionRunner extends ManagedTransactionFactory { * (but better NOT by using the blocking {@link Future#get()} on it). * * @param txConsumer the {@link CheckedConsumer} that needs a new read-write transaction - * @return the {@link ListenableFuture} returned by {@link ReadWriteTransaction#submit()}, + * @return the {@link ListenableFuture} returned by , * or a failed future with an application specific exception (not from submit()) + * @param Exception subclass */ @CheckReturnValue @Deprecated diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedTransactionFactory.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedTransactionFactory.java index 4676b5a55..45644ba18 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedTransactionFactory.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/ManagedTransactionFactory.java @@ -44,6 +44,9 @@ public interface ManagedTransactionFactory { * * @throws E if an error occurs. * @throws InterruptedException if the transaction is interrupted. + * @param DataObject subclass + * @param Exception subclass + * @param The type of result returned by the function. */ R applyWithNewReadOnlyTransactionAndClose(Class datastoreType, InterruptibleCheckedFunction, R, E> txFunction) throws E, InterruptedException; @@ -56,7 +59,7 @@ public interface ManagedTransactionFactory { * *

The function must not itself use * {@link ReadWriteTransaction#cancel()}, or - * {@link ReadWriteTransaction#submit()} (it will throw an {@link UnsupportedOperationException}). + * (it will throw an {@link UnsupportedOperationException}). * *

The provided transaction is specific to the given logical datastore type and cannot be used for any * other. @@ -74,8 +77,11 @@ public interface ManagedTransactionFactory { * @param datastoreType the {@link Datastore} type that will be accessed * @param txFunction the {@link InterruptibleCheckedFunction} that needs a new read-write transaction * - * @return the {@link ListenableFuture} returned by {@link ReadWriteTransaction#submit()}, + * @return the {@link ListenableFuture} returned by , * or a failed future with an application specific exception (not from submit()) + * @param DataObject subclass + * @param Exception subclass + * @param The type of result returned by the function. */ @CheckReturnValue @@ -98,6 +104,8 @@ public interface ManagedTransactionFactory { * * @throws E if an error occurs. * @throws InterruptedException if the transaction is interrupted. + * @param DataObject subclass + * @param Exception subclass */ void callWithNewReadOnlyTransactionAndClose(Class datastoreType, InterruptibleCheckedConsumer, E> txConsumer) throws E, InterruptedException; @@ -110,7 +118,7 @@ public interface ManagedTransactionFactory { * *

The consumer should not (cannot) itself use * {@link ReadWriteTransaction#cancel()}, or - * {@link ReadWriteTransaction#submit()} (it will throw an {@link UnsupportedOperationException}). + * (it will throw an {@link UnsupportedOperationException}). * *

The provided transaction is specific to the given logical datastore type and cannot be used for any * other. @@ -127,8 +135,10 @@ public interface ManagedTransactionFactory { * * @param datastoreType the {@link Datastore} type that will be accessed * @param txConsumer the {@link InterruptibleCheckedConsumer} that needs a new read-write transaction - * @return the {@link ListenableFuture} returned by {@link ReadWriteTransaction#submit()}, + * @return the {@link ListenableFuture} returned by , * or a failed future with an application specific exception (not from submit()) + * @param DataObject subclass + * @param Exception subclass */ @CheckReturnValue @@ -143,7 +153,7 @@ public interface ManagedTransactionFactory { * *

The consumer should not (cannot) itself use * {@link WriteTransaction#cancel()}, or - * {@link WriteTransaction#submit()} (it will throw an {@link UnsupportedOperationException}). + * (it will throw an {@link UnsupportedOperationException}). * *

The provided transaction is specific to the given logical datastore type and cannot be used for any * other. @@ -160,8 +170,10 @@ public interface ManagedTransactionFactory { * * @param datastoreType the {@link Datastore} type that will be accessed * @param txConsumer the {@link InterruptibleCheckedConsumer} that needs a new write only transaction - * @return the {@link ListenableFuture} returned by {@link WriteTransaction#submit()}, + * @return the {@link ListenableFuture} returned by , * or a failed future with an application specific exception (not from submit()) + * @param DataObject subclass + * @param Exception subclass */ @CheckReturnValue diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedReadTransaction.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedReadTransaction.java index cb2fdfae7..fce59a627 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedReadTransaction.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedReadTransaction.java @@ -11,6 +11,7 @@ import com.google.common.util.concurrent.FluentFuture; import java.util.Optional; import org.opendaylight.mdsal.binding.api.ReadTransaction; import org.opendaylight.mdsal.binding.api.Transaction; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -28,8 +29,7 @@ public interface TypedReadTransaction /** * Reads an object from the given path. * - * @see ReadTransaction#read(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier) + * @see ReadTransaction#read(LogicalDatastoreType, InstanceIdentifier) * * @param path The path to read from. * @param The type of the expected object. @@ -40,8 +40,7 @@ public interface TypedReadTransaction /** * Determines if an object exists at the given path. * - * @see ReadTransaction#exists(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier) + * @see ReadTransaction#exists(LogicalDatastoreType, InstanceIdentifier) * * @param path The path to read from. * @return A future providing access to the result of the check, when it’s available, or any error encountered. diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedWriteTransaction.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedWriteTransaction.java index 02130a444..d05ab4778 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedWriteTransaction.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/infra/TypedWriteTransaction.java @@ -9,6 +9,7 @@ package org.opendaylight.genius.infra; import org.opendaylight.mdsal.binding.api.Transaction; import org.opendaylight.mdsal.binding.api.WriteTransaction; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -24,8 +25,7 @@ public interface TypedWriteTransaction extends /** * Writes an object to the given path. * - * @see WriteTransaction#put(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier, DataObject) + * @see WriteTransaction#put(LogicalDatastoreType, InstanceIdentifier, DataObject) ) * * @param path The path to write to. * @param data The object to write. @@ -36,8 +36,7 @@ public interface TypedWriteTransaction extends /** * Writes an object to the given path, creating missing parents if requested. * - * @see WriteTransaction#put(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier, DataObject, boolean) + * @see WriteTransaction#put(LogicalDatastoreType, InstanceIdentifier, DataObject) * * @param path The path to write to. * @param data The object to write. @@ -50,8 +49,7 @@ public interface TypedWriteTransaction extends /** * Merges an object with the data already present at the given path. * - * @see WriteTransaction#merge(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier, DataObject) + * @see WriteTransaction#merge(LogicalDatastoreType, InstanceIdentifier, DataObject) * * @param path The path to write to. * @param data The object to merge. @@ -62,8 +60,7 @@ public interface TypedWriteTransaction extends /** * Merges an object with the data already present at the given path, creating missing parents if requested. * - * @see WriteTransaction#merge(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier, DataObject, boolean) + * @see WriteTransaction#merge(LogicalDatastoreType, InstanceIdentifier, DataObject) * * @param path The path to write to. * @param data The object to merge. @@ -76,8 +73,7 @@ public interface TypedWriteTransaction extends /** * Deletes the object present at the given path. * - * @see WriteTransaction#delete(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, - * InstanceIdentifier) + * @see WriteTransaction#delete(LogicalDatastoreType, InstanceIdentifier) * * @param path The path to delete. */ diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MDSALUtil.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MDSALUtil.java index b858eacea..395e2ab0f 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MDSALUtil.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MDSALUtil.java @@ -16,6 +16,7 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.ExecutionException; import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker; +import org.opendaylight.genius.infra.Datastore; import org.opendaylight.genius.mdsalutil.actions.ActionDrop; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; @@ -542,8 +543,13 @@ public class MDSALUtil { /** * Deprecated read. + * @param datastoreType the {@link Datastore} type that will be accessed + * @param path The path to write to. + * @param broker the broker * @deprecated Use {@link SingleTransactionDataBroker#syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional( * DataBroker, LogicalDatastoreType, InstanceIdentifier)} + * @return returns an Optional object containing the data + * @param DataObject subclass */ @Deprecated public static Optional read(LogicalDatastoreType datastoreType, @@ -554,8 +560,15 @@ public class MDSALUtil { /** * Deprecated read. + * @param broker the broker + * @param datastoreType the {@link Datastore} type that will be accessed + * @param path The path to write to. * @deprecated Use {@link SingleTransactionDataBroker#syncReadOptional( * DataBroker, LogicalDatastoreType, InstanceIdentifier)} + * @return returns an Optional object containing the data + * @param DataObject subclass + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted */ @Deprecated public static Optional read(DataBroker broker, LogicalDatastoreType datastoreType, @@ -566,9 +579,14 @@ public class MDSALUtil { /** * Deprecated write. * + * @param broker the broker + * @param datastoreType the {@link Datastore} type that will be accessed + * @param path The path to write to. + * @param data The object to write. * @deprecated Use * {@link SingleTransactionDataBroker#syncWrite( * DataBroker, LogicalDatastoreType, InstanceIdentifier, DataObject)} + * @param DataObject subclass */ @Deprecated public static void syncWrite(DataBroker broker, @@ -585,9 +603,14 @@ public class MDSALUtil { /** * Deprecated update. * + * @param broker the broker + * @param datastoreType the {@link Datastore} type that will be accessed + * @param path The path to write to. + * @param data The object to write. * @deprecated Use * {@link SingleTransactionDataBroker#syncUpdate( * DataBroker, LogicalDatastoreType, InstanceIdentifier, DataObject)} + * @param DataObject subclass */ @Deprecated public static void syncUpdate(DataBroker broker, @@ -604,8 +627,12 @@ public class MDSALUtil { /** * Deprecated delete. * + * @param broker the broker + * @param datastoreType the {@link Datastore} type that will be accessed + * @param path The path to write to. * @deprecated Use * {@link SingleTransactionDataBroker#syncDelete(DataBroker, LogicalDatastoreType, InstanceIdentifier)} + * @param DataObject subclass */ @Deprecated public static void syncDelete(DataBroker broker, diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MetaDataUtil.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MetaDataUtil.java index 918eaa665..bd20334f9 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MetaDataUtil.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/MetaDataUtil.java @@ -124,6 +124,8 @@ public final class MetaDataUtil { * For the tunnel id with VNI and valid-vni-flag set, the most significant byte * should have 08. So, shifting 08 to 7 bytes (56 bits) and the result is OR-ed with * VNI being shifted to 1 byte. + * @param vni virtual network id + * @return TunnelId */ public static Uint64 getTunnelIdWithValidVniBitAndVniSet(int vni) { return Uint64.valueOf(8L << 56 | vni << 8); @@ -195,6 +197,10 @@ public final class MetaDataUtil { /** Utility to fetch the register value for lport dispatcher table. * Register6 used for service binding will have first 4 bits of service-index, next 20 bits for lportTag, * and next 4 bits for interface-type + * @param lportTag lport tag of interface + * @param serviceIndex serviceIndex of interface + * @param interfaceType type of interface + * @return reg6 value of lport dispatcher */ public static long getReg6ValueForLPortDispatcher(int lportTag, short serviceIndex, short interfaceType) { // FIXME: this can be done more efficiently diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/NWUtil.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/NWUtil.java index 72d808277..d3c769f5c 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/NWUtil.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/NWUtil.java @@ -116,6 +116,7 @@ public final class NWUtil { * Accepts a MAC address and returns the corresponding long, where the MAC * bytes are set on the lower order bytes of the long. * + * @param macAddress The MAC * @return a long containing the mac address bytes */ public static long macByteToLong(byte[] macAddress) { @@ -162,6 +163,10 @@ public final class NWUtil { /** * Returns the ids of the currently operative DPNs. + * @param dataBroker instance of databroker + * @return List of DPNs + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted */ public static List getOperativeDPNs(DataBroker dataBroker) throws ExecutionException, InterruptedException { List result = new LinkedList<>(); diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/interfaces/IMdsalApiManager.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/interfaces/IMdsalApiManager.java index b8af71c8f..3a6c60435 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/interfaces/IMdsalApiManager.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/interfaces/IMdsalApiManager.java @@ -27,7 +27,9 @@ public interface IMdsalApiManager { /** * Adds a flow. * + * @param flowEntity The flow entity. * @deprecated Use {@link #addFlow(TypedWriteTransaction, FlowEntity)}. + * @return */ @Deprecated FluentFuture installFlow(FlowEntity flowEntity); @@ -35,7 +37,10 @@ public interface IMdsalApiManager { /** * Adds a flow. * + * @param dpId The DPN identifier. + * @param flowEntity The flow entity. * @deprecated Use {@link #addFlow(TypedWriteTransaction, Uint64, Flow)}. + * @return */ @Deprecated FluentFuture installFlow(Uint64 dpId, Flow flowEntity); @@ -43,7 +48,10 @@ public interface IMdsalApiManager { /** * Adds a flow. * + * @param dpId The DPN identifier. + * @param flowEntity The flow entity. * @deprecated Use {@link #addFlow(TypedWriteTransaction, FlowEntity)}. + * @return */ @Deprecated FluentFuture installFlow(Uint64 dpId, FlowEntity flowEntity); @@ -68,7 +76,11 @@ public interface IMdsalApiManager { /** * Removes a flow. * + * @param dpId The DPN identifier. + * @param tableId The table identifier. + * @param flowId The flow identifier. * @deprecated Use {@link #removeFlow(TypedReadWriteTransaction, Uint64, String, short)}. + * @return */ @Deprecated ListenableFuture removeFlow(Uint64 dpId, short tableId, FlowId flowId); @@ -76,7 +88,9 @@ public interface IMdsalApiManager { /** * Removes a flow. * + * @param flowEntity The flow entity. * @deprecated Use {@link #removeFlow(TypedReadWriteTransaction, FlowEntity)}. + * @return */ @Deprecated FluentFuture removeFlow(FlowEntity flowEntity); @@ -95,6 +109,8 @@ public interface IMdsalApiManager { * @param tx The transaction to use. * @param dpId The DPN identifier. * @param flow The flow. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeFlow(TypedReadWriteTransaction tx, Uint64 dpId, Flow flow) throws ExecutionException, InterruptedException; @@ -104,6 +120,8 @@ public interface IMdsalApiManager { * * @param tx The transaction to use. * @param flowEntity The flow entity. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeFlow(TypedReadWriteTransaction tx, FlowEntity flowEntity) throws ExecutionException, InterruptedException; @@ -115,6 +133,8 @@ public interface IMdsalApiManager { * @param dpId The DPN identifier. * @param flowKey The flow key. * @param tableId The table identifier. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeFlow(TypedReadWriteTransaction tx, Uint64 dpId, FlowKey flowKey, short tableId) throws ExecutionException, InterruptedException; @@ -126,6 +146,8 @@ public interface IMdsalApiManager { * @param dpId The DPN identifier. * @param flowId The flow identifier. * @param tableId The table identifier. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeFlow(TypedReadWriteTransaction tx, Uint64 dpId, String flowId, short tableId) throws ExecutionException, InterruptedException; @@ -150,6 +172,7 @@ public interface IMdsalApiManager { /** * Remove a group. * + * @param groupEntity The group to remove. * @deprecated Use {@link #removeGroup(TypedReadWriteTransaction, GroupEntity)} */ @Deprecated @@ -160,6 +183,8 @@ public interface IMdsalApiManager { * * @param tx The transaction to use. * @param groupEntity The group to remove. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeGroup(TypedReadWriteTransaction tx, GroupEntity groupEntity) throws ExecutionException, InterruptedException; @@ -170,6 +195,8 @@ public interface IMdsalApiManager { * @param tx The transaction to use. * @param dpId The DPN identifier. * @param group The group to remove. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeGroup(TypedReadWriteTransaction tx, Uint64 dpId, Group group) throws ExecutionException, InterruptedException; @@ -180,6 +207,8 @@ public interface IMdsalApiManager { * @param tx The transaction to use. * @param dpId The DPN identifier. * @param groupId The group identifier of the group to remove. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException in case of a technical (!) error while reading */ void removeGroup(TypedReadWriteTransaction tx, Uint64 dpId, long groupId) throws ExecutionException, InterruptedException; @@ -200,6 +229,8 @@ public interface IMdsalApiManager { * API to remove the flow on Data Plane Node synchronously. It internally waits for * Flow Change Notification to confirm flow delete request is being sent with-in delayTime. * + * @param flowEntity The flow entity. + * @param delayTime The delay time. * @deprecated Use {@link #removeFlow(TypedReadWriteTransaction, FlowEntity)}. */ @Deprecated @@ -208,6 +239,7 @@ public interface IMdsalApiManager { /** * Removes a flow. * + * @param flowEntity The flow entity. * @deprecated Use {@link #removeFlow(TypedReadWriteTransaction, FlowEntity)}. */ @Deprecated @@ -216,6 +248,8 @@ public interface IMdsalApiManager { /** * Install a flow. * + * @param flowEntity The flow entity. + * @param delayTime The delay time. * @deprecated Use {@link #addFlow(TypedWriteTransaction, FlowEntity)}. */ @Deprecated @@ -224,6 +258,7 @@ public interface IMdsalApiManager { /** * Installs a flow. * + * @param flowEntity The flow entity. * @deprecated Use {@link #addFlow(TypedWriteTransaction, FlowEntity)}. */ @Deprecated @@ -232,6 +267,7 @@ public interface IMdsalApiManager { /** * Installs a group. * + * @param groupEntity The group to add. * @deprecated Use {@link #addGroup(TypedWriteTransaction, GroupEntity)}. */ @Deprecated @@ -240,6 +276,7 @@ public interface IMdsalApiManager { /** * API to remove the Group on Data Plane Node synchronously. It internally waits for * Group Change Notification to confirm group delete request is being sent. + * @param groupEntity The group to add. * @deprecated Use {@link #removeGroup(TypedReadWriteTransaction, GroupEntity)}. */ @Deprecated diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/packet/ICMP.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/packet/ICMP.java index 01edbad44..06048a144 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/packet/ICMP.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/packet/ICMP.java @@ -143,6 +143,8 @@ public class ICMP extends Packet { /** * Sets the ICMP sequence number for the current ICMP object instance. + * @param seqNumber sequence number + * @return sequence number */ public ICMP setSequenceNumber(short seqNumber) { byte[] icmpSeqNumber = BitBufferHelper.toByteArray(seqNumber); diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/batching/ResourceBatchingManager.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/batching/ResourceBatchingManager.java index d2646faef..80c4b19d9 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/batching/ResourceBatchingManager.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/batching/ResourceBatchingManager.java @@ -155,6 +155,7 @@ public class ResourceBatchingManager implements AutoCloseable { * * @param resourceType resource type that was registered with batch manager * @param identifier identifier to be read + * @param DataObject subclass * @return a CheckFuture containing the result of the read */ public FluentFuture> read( diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepSouthboundUtils.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepSouthboundUtils.java index a0e661c21..efbd5e78b 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepSouthboundUtils.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepSouthboundUtils.java @@ -112,6 +112,7 @@ public final class HwvtepSouthboundUtils { * * @param nodeId * the node id + * @param logicalSwitchName the logical switch name * @param mac * the mac * @return the instance identifier @@ -130,6 +131,7 @@ public final class HwvtepSouthboundUtils { * * @param nodeId * the node id + * @param logicalSwitchName the logical switch name * @param mac * the mac * @return the instance identifier @@ -275,6 +277,7 @@ public final class HwvtepSouthboundUtils { * the desc * @param tunnelKey * the tunnel key + * @param replicationMode replication mode * @return the logical switches */ public static LogicalSwitches createLogicalSwitch(String name, String desc, String tunnelKey, diff --git a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepUtils.java b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepUtils.java index 0c620e158..4e5683fa1 100644 --- a/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepUtils.java +++ b/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepUtils.java @@ -134,6 +134,7 @@ public final class HwvtepUtils { * * @param transaction * the transaction + * @param logicalDatastoreType the LogicalDatastoreType * @param nodeId * the node id * @param logicalSwitch @@ -200,12 +201,16 @@ public final class HwvtepUtils { /** * Gets the logical switch. * + * @param broker the broker + * @param datastoreType the datastore type * @param nodeId * the node id * @param logicalSwitchName * the logical switch name * @return the logical switch * @deprecated Use {@link #getLogicalSwitch(TypedReadTransaction, NodeId, String)}. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ @Deprecated public static LogicalSwitches getLogicalSwitch(DataBroker broker, LogicalDatastoreType datastoreType, NodeId nodeId, @@ -247,6 +252,8 @@ public final class HwvtepUtils { * @param portName * port name under physical switch node id * @return the physical port termination point + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ public static TerminationPoint getPhysicalPortTerminationPoint(DataBroker broker, LogicalDatastoreType datastoreType, NodeId nodeId, String portName) throws ExecutionException, @@ -266,6 +273,8 @@ public final class HwvtepUtils { * @param vni * virtual network id * @return the logical switches + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ public static LogicalSwitches getLogicalSwitches(DataBroker broker, String hwVtepNodeId, String vni) throws ExecutionException, InterruptedException { @@ -329,6 +338,8 @@ public final class HwvtepUtils { * @param phyLocatorIp * the phy locator ip * @return the physical locator + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ public static HwvtepPhysicalLocatorAugmentation getPhysicalLocator(DataBroker broker, LogicalDatastoreType datastoreType, NodeId nodeId, final IpAddress phyLocatorIp) throws @@ -438,6 +449,7 @@ public final class HwvtepUtils { * the broker * @param nodeId * the node id + * @param logicalSwitchName the logical switch name * @param mac * the mac * @return the listenable future @@ -458,6 +470,7 @@ public final class HwvtepUtils { * the transaction * @param nodeId * the node id + * @param logialSwitchName the logical switch name * @param mac * the mac * @deprecated Use {@link #deleteRemoteUcastMac(TypedWriteTransaction, NodeId, String, MacAddress)}. @@ -489,6 +502,7 @@ public final class HwvtepUtils { * the broker * @param nodeId * the node id + * @param logicalSwitchName the logical switch name * @param lstMac * the lst mac * @return the listenable future @@ -509,6 +523,7 @@ public final class HwvtepUtils { * the transaction * @param nodeId * the node id + * @param logicalSwitchName the logical switch name * @param lstMac * the lst mac * @deprecated Use {@link #deleteRemoteUcastMacs(TypedWriteTransaction, NodeId, String, Iterable)}. @@ -597,6 +612,10 @@ public final class HwvtepUtils { /** * Adds a remote multicast MAC. * + * @param transaction the transaction + * @param logicalDatastoreType the LogicalDatastoreType + * @param nodeId the node id + * @param remoteMcastMac the remote mcast mac * @deprecated Use {@link #addRemoteMcastMac(TypedWriteTransaction, NodeId, RemoteMcastMacs)}. */ @Deprecated @@ -635,6 +654,8 @@ public final class HwvtepUtils { * the remote mcast macs key * @return the remote mcast mac * @deprecated Use {@link #getRemoteMcastMac(TypedReadTransaction, NodeId, RemoteMcastMacsKey)}. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ @Deprecated public static RemoteMcastMacs getRemoteMcastMac(DataBroker broker, LogicalDatastoreType datastoreType, @@ -876,6 +897,8 @@ public final class HwvtepUtils { * the node id * @return the hw vtep node * @deprecated Use {@link #getHwVtepNode(TypedReadTransaction, NodeId)}. + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ @Deprecated public static Node getHwVtepNode(DataBroker dataBroker, LogicalDatastoreType datastoreType, NodeId nodeId) @@ -903,6 +926,7 @@ public final class HwvtepUtils { * Installs a list of Mac Addresses as remote Ucast address in an external * device using the hwvtep-southbound. * + * @param broker the databroker * @param deviceNodeId * NodeId if the ExternalDevice where the macs must be installed * in. @@ -914,6 +938,7 @@ public final class HwvtepUtils { * VTEP's IP in this OVS used for the tunnel with external * device. * @deprecated Use {@link #addUcastMacs(TypedWriteTransaction, String, Iterable, String, IpAddress)}. + * @return future if present */ @Deprecated public static FluentFuture installUcastMacs(DataBroker broker, @@ -959,7 +984,12 @@ public final class HwvtepUtils { /** * Retrieves the database version. * + * @param broker the broker + * @param nodeId the node id * @deprecated Use {@link #getDbVersion(TypedReadTransaction, NodeId)}. + * @return dbversion + * @throws ExecutionException in case of a technical (!) error while reading + * @throws InterruptedException if the transaction is interrupted. */ @Deprecated public static String getDbVersion(DataBroker broker, NodeId nodeId) throws ExecutionException, diff --git a/mdsalutil/mdsalutil-testutils/src/main/java/org/opendaylight/genius/datastoreutils/testutils/DataBrokerFailures.java b/mdsalutil/mdsalutil-testutils/src/main/java/org/opendaylight/genius/datastoreutils/testutils/DataBrokerFailures.java index 39c7e4112..480419650 100644 --- a/mdsalutil/mdsalutil-testutils/src/main/java/org/opendaylight/genius/datastoreutils/testutils/DataBrokerFailures.java +++ b/mdsalutil/mdsalutil-testutils/src/main/java/org/opendaylight/genius/datastoreutils/testutils/DataBrokerFailures.java @@ -25,7 +25,7 @@ public interface DataBrokerFailures { * Fails all future reads. * * @param exception a {@link ReadFailedException} to throw from a - * {@link ReadOnlyTransaction#read(LogicalDatastoreType, InstanceIdentifier)} call. + * {@link ReadWriteTransaction#read(LogicalDatastoreType, InstanceIdentifier)} call. */ void failReads(ReadFailedException exception); @@ -35,7 +35,7 @@ public interface DataBrokerFailures { * @param howManyTimes how many times to throw the passed exception, until it resets. * * @param exception a {@link ReadFailedException} to throw from a - * {@link ReadOnlyTransaction#read(LogicalDatastoreType, InstanceIdentifier)} call. + * {@link ReadWriteTransaction#read(LogicalDatastoreType, InstanceIdentifier)} call. */ void failReads(int howManyTimes, ReadFailedException exception); @@ -43,8 +43,8 @@ public interface DataBrokerFailures { * Fails all future Transaction submits. * * @param exception - * an Exception to throw from a {@link WriteTransaction#submit()} - * (also {@link ReadWriteTransaction#submit()}) method + * an Exception to throw from a {@link WriteTransaction#commit()} + * (also {@link ReadWriteTransaction#commit()} ) method */ void failSubmits(TransactionCommitFailedException exception); @@ -55,8 +55,8 @@ public interface DataBrokerFailures { * how many times to throw the passed exception, until it resets * * @param exception - * an Exception to throw from a {@link WriteTransaction#submit()} - * (also {@link ReadWriteTransaction#submit()}) method + * an Exception to throw from a {@link WriteTransaction#commit()} + * (also {@link ReadWriteTransaction#commit()} method */ void failSubmits(int howManyTimes, TransactionCommitFailedException exception); -- 2.36.6