controller.git
5 years agoFix wait for schema in BindingToNormalizedNodeCodec 81/35881/7
Tom Pantelis [Mon, 7 Mar 2016 11:20:13 +0000 (06:20 -0500)]
Fix wait for schema in BindingToNormalizedNodeCodec

The wait for schema mechanism does not work. A few issues were fixed:

 - FutureSchema did not add the FutureSchemaPredicate instances to the
   postponedOperations list so they always timed out.

 - The waitForSchema method in BindingToNormalizedNodeCodec checked for
   !futureSchema.waitForSchema so it only successfully returned on
   failure.

 - There was a timing issue in FutureSchema where a context update could
   occur just prior to adding a postponed operation to the list, in
   which case the operation may timeout if the new update contained the
   postponed criteria and another update didn't occur in time. To
   alleviate this, the sychronization was tighted up and runtime context
   is now stored in FutureSchema instead of BindingToNormalizedNodeCodec.

 - The runtimeContext field needs to be volatile.

I also added a wait if the runtimeContext was null b/c
onGlobalContextUpdated hadn't been initially notified yet.

Added unit tests to cover the wait for schema mechanism.

Change-Id: I7155dae021453d085f89d13dfd4b069178dd2fc8
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoStop logging complete data tree on prepare/commit failure 57/36457/2
Moiz Raja [Fri, 18 Mar 2016 19:29:50 +0000 (12:29 -0700)]
Stop logging complete data tree on prepare/commit failure

Sometimes the data tree modification is so large that just trying to create
the buffer to hold the message can make the controller run out of memory. Plus
it's rarely useful to have a log filled with data which obfuscates other
important log messages. This patch still logs the data tree modification at
trace level.

Change-Id: I76bff9f7e836ee5eff347b0b77e2817f441ab953
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoUse instanceof instead of .class.isInstance() 98/36298/2
Robert Varga [Wed, 16 Mar 2016 15:16:35 +0000 (16:16 +0100)]
Use instanceof instead of .class.isInstance()

These two are equivalent and using instanceof is more consistent with the rest
of the code.

Change-Id: I0493a94a09f66e19afb503afd05682692fba1b40
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoHandle snapshot support messages first 97/36297/2
Robert Varga [Wed, 16 Mar 2016 13:50:56 +0000 (14:50 +0100)]
Handle snapshot support messages first

This checks with snapshot snapshot support first, making the code a bit
more readable.

Change-Id: I1a9ea097d71b2f28771e19b2b1979ebff0f15e7a
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove duplicate 'return true' statements 96/36296/2
Robert Varga [Wed, 16 Mar 2016 13:48:12 +0000 (14:48 +0100)]
Remove duplicate 'return true' statements

Instead of having each case return true, make it the default return
from the method and use the last else branch to return false.

Change-Id: I545d2f2c19ef8a10b693a0e904766141bc5db34e
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDo not allow overrides of onReceive{Command,Recover} 92/36292/3
Robert Varga [Wed, 16 Mar 2016 13:21:16 +0000 (14:21 +0100)]
Do not allow overrides of onReceive{Command,Recover}

We already have protected methods to handle these cases, do not allow
overrides, as they create confusion around which method does what.

Change-Id: I3d6e9b9c4dc72a53471bf60324e4c7f36845ed5b
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBug 2562: Binding Data Codec: Incorrectly deserialized unkeyed list from NormalizedNode 35/36435/2
Filip Gregor [Fri, 18 Mar 2016 10:21:03 +0000 (11:21 +0100)]
Bug 2562: Binding Data Codec: Incorrectly deserialized unkeyed list from NormalizedNode

added test show that this is no longer an issue

Change-Id: I3f84b0ebc71d1fef85068e2ff7b06a78c397e4c8
Signed-off-by: Filip Gregor <fgregor@cisco.com>
5 years agoFix forwarding in Shard.handleBatchedModifications 21/35121/6
Tom Pantelis [Fri, 19 Feb 2016 21:40:52 +0000 (16:40 -0500)]
Fix forwarding in Shard.handleBatchedModifications

Addressed the TODO in Shard.handleBatchedModifications to handle the
case where the BatchedModifications is not the first batch when leadership
changes and the BatchedModifications needs to be forwarded to the new
leader. Added code in ShardCommitCoordinator to reconstruct all previous
BatchedModifications messages, if needed, from the transaction
DataTreeModification, honoring the max batched modification count.

Change-Id: I4fecb71be91aee24072086e1565437a69c20c8d9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoImplement ChangeServersVotingStatus message in RafActor 11/32511/8
Tom Pantelis [Tue, 12 Jan 2016 23:21:15 +0000 (18:21 -0500)]
Implement ChangeServersVotingStatus message in RafActor

Added a new ChangeServersVotingStatus message to change servers to/from
voting members. The leader updates its local peer info and persists and
replicates a new ServerConfigurationPayload with the appropriate voting
states. If the leader changes to non-voting it steps down as leader by
initiating a leadership transfer.

Change-Id: If073e4665cb1a270aae6e3dce36a6b3e900d0282
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix intermittent unit test failures 40/36440/1
Tom Pantelis [Fri, 18 Mar 2016 04:22:27 +0000 (00:22 -0400)]
Fix intermittent unit test failures

Change-Id: I2ef68b48de8da4cc7d82a91263976295458d011a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoBug 5485: Improve DataTreeModification pruning on recovery 13/36013/5
Tom Pantelis [Wed, 9 Mar 2016 04:07:02 +0000 (23:07 -0500)]
Bug 5485: Improve DataTreeModification pruning on recovery

Modified the PruningDataTreeModification and NormalizedNodePruner to
validate path and node QNames via the SchemaContext instead of just
namespaces. This allows migration support for any element to be removed
from a yang hierarchy.

Also handled SchemaValidationFailedException on ready which can happen
with writes which don't immediately validate the sctructure as merge
does. The modification tree is re-applied with pruning.

Change-Id: I8c4f84fbaa93563ce6741d7a3e15855f7fc4940f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoBug 5460: Fix snaphots on follower 74/36274/2
Tom Pantelis [Tue, 15 Mar 2016 23:51:58 +0000 (19:51 -0400)]
Bug 5460: Fix snaphots on follower

Added a callback to the appendAndPersist call in Follower to call
captureSnapshotIfReady.

Added checks in ReplicationAndSnapshotsIntegrationTest to verify the
followers snapshot along with the leader.

Change-Id: Ie71f1b16152541d069f9d005ba669cb1e5771dd1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoConvert toaster-it to use mdsal-it 74/36074/9
Tom Pantelis [Thu, 10 Mar 2016 11:48:43 +0000 (06:48 -0500)]
Convert toaster-it to use mdsal-it

I recently added an mdsal dependency to another project and it caused
the toaster-it test to fail. There was no useful output to troubleshoot,
just that some bundles failed to resolve.

It turns out the mdsal dependency and all its dependencies would need to be
added to the hard-coded bundle configuration for the test. This will be ongoing
issue every time a new dependency is added that might affect the toaster test.

To alleviate this I converted the test from manually installing bundles to use
the mdsal-it functionality which installs features into the
opendaylight-karaf-empty distro.

I also changed AbstractConfigTestBase to override the pax logging to
append to stdout, otherwise most output goes to karaf.log. This is helpful to
troubleshoot failures.

Change-Id: I1dd9150c6e617e491458560fe4b360d37548f264
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix intermittent RaftActorLeadershipTransferCohortTest failure 58/36158/2
Tom Pantelis [Fri, 11 Mar 2016 23:44:55 +0000 (18:44 -0500)]
Fix intermittent RaftActorLeadershipTransferCohortTest failure

Change-Id: I4c58f6545d7ef7667c7fcf42f5dda82345ab1167
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoAdd Maven Site generation data 22/36022/4
Thanh Ha [Thu, 10 Mar 2016 02:04:09 +0000 (21:04 -0500)]
Add Maven Site generation data

Add the necessary configuration to allow new projects to automatically
have Maven Site generation enabled when they use the startup-archetype.

Change-Id: Icfd69505bb01f3e8f895a7fef4147d4d8779de9d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoFix yangtools version in startup archetype 21/36021/3
Thanh Ha [Thu, 10 Mar 2016 01:46:39 +0000 (20:46 -0500)]
Fix yangtools version in startup archetype

Yangtools version for Boron should be 1.0.0-SNAPSHOT.

Change-Id: I2109eb26d8de717ecfa212d1448456a4048e9191
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoChange default version to 0.1.0-SNAPSHOT 20/36020/4
Thanh Ha [Thu, 10 Mar 2016 01:35:02 +0000 (20:35 -0500)]
Change default version to 0.1.0-SNAPSHOT

With semantic versioning a project's initial version should not start
with 1.0.0-SNAPSHOT. Changing it to 0.1.0-SNAPSHOT so that a project can
start off with the recommended value.

See: http://semver.org/

Change-Id: Id3b99a9a5ccb2d68be02cc6faa0d4253e5b80f80
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoBump default copyright year to 2016 19/36019/4
Thanh Ha [Thu, 10 Mar 2016 01:34:20 +0000 (20:34 -0500)]
Bump default copyright year to 2016

Change-Id: I1d520d0c0b18002921f1f45768f62cdf58214cfb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoImprove formatting for visual satisfaction 18/36018/4
Thanh Ha [Thu, 10 Mar 2016 01:29:08 +0000 (20:29 -0500)]
Improve formatting for visual satisfaction

Formatting for the startup poms improved to be more visually appealing
and easier to read.

Change-Id: Ibdd3828f712eed1e6864bbbbcbb316bf4e5962ac
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoBug 4823: Offload generation of DCNs from Shard 96/34096/5
Tom Pantelis [Thu, 4 Feb 2016 06:39:20 +0000 (01:39 -0500)]
Bug 4823: Offload generation of DCNs from Shard

Generation of data change notifications can be expensive with large
lists which can block the Shard actor for many seconds. This processing
was offloaded to other actors to free up the Shard, one for DCLs and the
other for DTCLs. I separated the 2 types of listeners b/c DCN generation
is much more expensive than DTCs so at least DTCLs aren't held up by
DCLs.

Change-Id: I1bfb5d572c793f8eb703ebf0a7fd9bf628747168
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoDo not guard simple logging with isXXXEnabled() 18/36118/1
Robert Varga [Fri, 11 Mar 2016 12:30:52 +0000 (13:30 +0100)]
Do not guard simple logging with isXXXEnabled()

There is not benefit in the guards, making them pure overhead.

Change-Id: I75e310a2f08e5650db436bb4a7f46d85cbde313d
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove commented-out logging 16/36116/1
Robert Varga [Fri, 11 Mar 2016 12:07:26 +0000 (13:07 +0100)]
Remove commented-out logging

Remove commented-out logging lines and do not condition simple logging
on isDebugEnabled().

Change-Id: I648ee585a4cf2e4a4dfabecdcf0ce833906b4dac
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix issues with LeastLoadedCandidateSelectionStrategy 14/33714/3
Moiz Raja [Wed, 27 Jan 2016 22:43:39 +0000 (14:43 -0800)]
Fix issues with LeastLoadedCandidateSelectionStrategy

LLCSS degenerates into a round robin owner allocator when
ownership changes. This patch fixes that issue as follows,

- Consider the statistics that are collected using the DTL
  only as initialStatistics which are passed to the Strategy
  when it is created
- When Leadership changes clear all the strategies so that
  they get freshly created with the right initial statistic
- Modify the newOwner method on Strategy to
    - pass the currentOwner for the entity, for the current
      owner we decrease the ownership statistic
    - remove the statistics passed to it as it would no longer
      be required. Due to this removal we also get rid of all
      the CRUD which we had added to check if the passed in
      stats were actually greater than the local stats which
      anyway did not work.

Change-Id: I754f0459051687a95056857044777ca6eebbcd93
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoRemoved unnecessary file. 83/35083/3
Tony Tkacik [Fri, 19 Feb 2016 13:33:09 +0000 (14:33 +0100)]
Removed unnecessary file.

Change-Id: I1dfe4ec5a2ccca36f44d68c1639f28572425b831
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
5 years agoClean up DistributedEntityOwnershipService instantiation 01/35501/9
Robert Varga [Sat, 27 Feb 2016 01:30:06 +0000 (02:30 +0100)]
Clean up DistributedEntityOwnershipService instantiation

Most validation checks are done in customValidation(). Also add more
resilency to possible interactions with ConfigAdmin service.

The lambda conversion comes courtesy Eclipse on-save autoconvert.

A lot of this code needs to go away.

Change-Id: Ifaf4416015996be9a7716a2620f16a56b74d12b5
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDo not duplicate candidate list 45/35545/3
Robert Varga [Mon, 29 Feb 2016 11:45:52 +0000 (12:45 +0100)]
Do not duplicate candidate list

Iterables.getLast() provides an efficient way of getting the last item
from a collection, without the need to duplicate it.

Change-Id: I49b0bc827bffc0adb616cf516438bad7526ad141
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDo not use String.toString() 42/35542/3
Robert Varga [Mon, 29 Feb 2016 11:36:17 +0000 (12:36 +0100)]
Do not use String.toString()

Use Strings.isNullOrEmpty instead of open-coding the check, also add
preconditions for fields and eliminate a String.toString() call.

Change-Id: Ic25a60511514ea623d1d9bdde9675faec8d538f8
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBUG-4964: Bump to akka-2.4.1 24/32524/19
Robert Varga [Wed, 13 Jan 2016 20:42:04 +0000 (21:42 +0100)]
BUG-4964: Bump to akka-2.4.1

This updates the imports and adapts to API changes. Requires Java 8 to
work. Also bumps netty to 3.10.5, as that is what remoting requires.

Change-Id: I3a3886ac75496d07ec03ae561a6df03ecaa5ad0c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
5 years agoModify toaster example to use DataTreeChangeListener 09/35209/3
Tom Pantelis [Mon, 22 Feb 2016 04:22:43 +0000 (23:22 -0500)]
Modify toaster example to use DataTreeChangeListener

Change-Id: I88e16026247d4e4f979eb795f5c5ea33857ac66f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix ConcurrentModificationEx in RpcRegistry.onBucketsUpdated 14/35714/2
Tom Pantelis [Thu, 3 Mar 2016 17:52:47 +0000 (12:52 -0500)]
Fix ConcurrentModificationEx in RpcRegistry.onBucketsUpdated

This was introduced by a recent patch. onBucketsUpdated iterates the
routesUpdateCallbacks however one of the callbacks in receiveGetRouter
removes itself from the list causing the ConcurrentModificationEx.

I changed onBucketsUpdated to first copy the list to an array to prevent
this.

Change-Id: I44c9a89b4b433f711cf4f90bf28e6955d8784f5f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoRemove unused obsolete concepts code. 87/35087/4
Tony Tkacik [Fri, 19 Feb 2016 13:38:25 +0000 (14:38 +0100)]
Remove unused obsolete concepts code.

Change-Id: I7898e6ced3938ff245cbc9d4861bdce23e909d30
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
5 years agoRemoved non-building code. 84/35084/3
Tony Tkacik [Fri, 19 Feb 2016 13:36:06 +0000 (14:36 +0100)]
Removed non-building code.

Change-Id: Ic7ddbb76b3485704ffc48602c3081122cdd03d72
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
5 years agoMove JMX generator out of src/main 52/35052/3
Robert Varga [Fri, 19 Feb 2016 10:06:00 +0000 (11:06 +0100)]
Move JMX generator out of src/main

Move generated files to target/generated-sources/config-binding to make
sure we do not emit generated source files to src/main, where they run
risk of being added to SCM.

Change-Id: Idc8733dbfd5b125c96bfb49069a908174bfeefd0
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoUse {{VERSION}} for config files 20/35320/3
Robert Varga [Wed, 24 Feb 2016 10:16:01 +0000 (11:16 +0100)]
Use {{VERSION}} for config files

This detects failure to include a dependency, ensuring a failure.

Change-Id: I350a47ad7d844e0e61c818da796810c4ea1000dd
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBUG-4329: remove references to JDT 58/35358/1
Robert Varga [Wed, 24 Feb 2016 20:43:18 +0000 (21:43 +0100)]
BUG-4329: remove references to JDT

Since we have migrated the lonely test using JDT, we can now remove
references to it.

Change-Id: Ic814ba20e11ce95e5d25260be4c7cebcd5a21565
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix broken downstream features 17/35317/1
Robert Varga [Wed, 24 Feb 2016 09:18:36 +0000 (10:18 +0100)]
Fix broken downstream features

factoryakkaconf needs to be spelled out in the dependency of
features-mdsal.

Change-Id: I71e7cff1076fc63c08f6debefc72107046f8337f
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBug 4866: Add wait/retries for routed RPCs 75/34175/4
Tom Pantelis [Fri, 5 Feb 2016 07:42:54 +0000 (02:42 -0500)]
Bug 4866: Add wait/retries for routed RPCs

If a routed RPC is registered on one node it takes a little time for the
route to propagate via gossip to other nodes. If another node tries to
invoke the RPC prior to propagation it fails. To alleviate this timing
issue, I added wait/retries via a timer in the RpcRegistry for the
FindRouters message. As routes are updated via gossip, it retries the
FindRouters request. If the timer triggers, it sends back an empty list.
The timer period is 10 times the gossip tick interval (500ms * 10 = 5s).

Change-Id: Iaafcfb4c93cde44f62f6645c8b8684102ac0d0db
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix sporadic failures in ClusterAdminRpcServiceTest 85/35285/2
Tom Pantelis [Tue, 23 Feb 2016 18:10:21 +0000 (13:10 -0500)]
Fix sporadic failures in ClusterAdminRpcServiceTest

The testAddShardReplica is failing sporadically indirectly due to
https://git.opendaylight.org/gerrit/#/c/35097/. The leader's payload
version was -1 so a transaction's BatchedModifications instance was
serialized to the legacy protobuf message type and thus wasn't delivered.

The underlying problem is that RaftActor.updateConfigParams
needs to pass the previous leader's payload version when re-constructing
the Follower instance on RaftPolicy change.

Change-Id: Id6b8da98c145f2e265dddbc1b27384d54e400370
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoBug 5329: Add factory akka.conf 53/34553/5
Tom Pantelis [Fri, 12 Feb 2016 14:08:15 +0000 (09:08 -0500)]
Bug 5329: Add factory akka.conf

Added a factory akka.conf file that is shipped to
configuration/factory/akka.conf. This file contains all the necessary
akka settings. Modified the FileAkkaConfigurationReader to load the
existing configuration/initial/akka.conf file with the factory file as
the fallback. In this manner akka will overlay/merge the initial file
with the factory file. I pared down the initial file to only contain the
settings that users would normally set or configure to setup a cluster,
ie hostname, port, seed-nodes, roles.

In the features.xml, the factory file is configured to always overwrite
so changes are picked up on upgrade. We still preserve the initial file.

Change-Id: I8e80161e21d0ad0e26f1efa1023c670b3a5ef6bc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoRemove unused org.opendaylight.controller.xml.codec package/classes 14/35114/5
Tom Pantelis [Fri, 19 Feb 2016 16:12:17 +0000 (11:12 -0500)]
Remove unused org.opendaylight.controller.xml.codec package/classes

The org.opendaylight.controller.xml.codec utility classes in
sal-clustering-commons are no longer used so remove them. They were
originally used by the remote RPC code for conversion of the legacy
CompositeNode class which has since been removed. The code referencing
CompositeNode et al was removed from these classes but unused
remnants were left behind.

Change-Id: Ic8f880c8075f076549bb822f6dfbaaad81595ed1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix TerminationMonitor to reference correct Monitor class 13/35113/5
Tom Pantelis [Fri, 19 Feb 2016 15:46:37 +0000 (10:46 -0500)]
Fix TerminationMonitor to reference correct Monitor class

The TerminationMonitor actor listens for messages of type
org.opendaylight.controller.cluster.datastore.messages.Monitor
but the AbstractUntypedActor sends a message of type
org.opendaylight.controller.cluster.common.actor.Monitor.
TerminationMonitor was changed to reference the right class and
org.opendaylight.controller.cluster.datastore.messages.Monitor was
removed.

Change-Id: Ie0e8dd4face529c3b40e1227fec575a8bd4c9425
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoRemoved unused class NonPersistent 12/35112/4
Tom Pantelis [Fri, 19 Feb 2016 14:38:10 +0000 (09:38 -0500)]
Removed unused class NonPersistent

Change-Id: I9d50829fc254307127980bd4304e40d0e600f09f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoRemove returnSerialized from ForwardedReadyTransaction 00/35100/4
Tom Pantelis [Fri, 19 Feb 2016 13:48:00 +0000 (08:48 -0500)]
Remove returnSerialized from ForwardedReadyTransaction

With the removal of the pre-Lithium transaction messages, the
returnSerialized field in ForwardedReadyTransaction is no longer used
and thus was removed.

Change-Id: I4a23ed77ee1960d3bb634511a2222dfcd213062f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoChange BatchedModifications to extend VersionedExternalizableMessage 97/35097/8
Tom Pantelis [Fri, 19 Feb 2016 13:23:07 +0000 (08:23 -0500)]
Change BatchedModifications to extend VersionedExternalizableMessage

To be consistent with other transaction messages, changed
BatchedModifications to extend VersionedExternalizableMessage
via MutableCompositeModification.

Change-Id: I7dbf39f59b0e6263c38a062826eb6341b7cb16d1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoRemove clientTxVersion from ShardTransaction 96/35096/5
Tom Pantelis [Fri, 19 Feb 2016 11:59:21 +0000 (06:59 -0500)]
Remove clientTxVersion from ShardTransaction

With the removal of the pre-Lithium transaction messages,
ShardTransaction et al no longer need the clientTxVersion passed on
creation so this field was removed. When readying a tx, the version is
obtained from the BatchedModifications.

Change-Id: I96835f51f3665d205f93f6d98fd9497be5159510
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix unit test errors due to Mockito upgrade 11/35211/2
Tom Pantelis [Mon, 22 Feb 2016 05:08:52 +0000 (00:08 -0500)]
Fix unit test errors due to Mockito upgrade

The Mockito version was recently upgraded which causes some unit tests
to fail. Mockito no longer support never() used with timeout() so
workaround that.

Change-Id: I861e3ea198a630347b8de4c915d49b2718cc3d2c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoSwitch aggregator to odlparent-lite 50/35150/3
Robert Varga [Sun, 21 Feb 2016 15:36:27 +0000 (16:36 +0100)]
Switch aggregator to odlparent-lite

Change-Id: Ib3711fc7eb6efab3ff6bd711195b227ad88c6205
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
5 years agoBUG-4329: switch to javaparser 53/35153/2
Robert Varga [Sun, 21 Feb 2016 16:07:10 +0000 (17:07 +0100)]
BUG-4329: switch to javaparser

Instead of using Eclipse JDT, which has not been published in ages, use
comgithub.javaparser, which supports Java 8 and is quite convenient.

Change-Id: I30d3975679b6b24952eabe5488fbce2db49ab0e6
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
5 years agoBUG-2912: Better document DataChangeScope.ONE 11/34911/4
Colin Dixon [Tue, 16 Feb 2016 18:06:50 +0000 (13:06 -0500)]
BUG-2912: Better document DataChangeScope.ONE

Provides information about the way this scope interacts with lists in and the
binding independent data tree that might be counterintuitive when compared with
a binding aware view of the same data.

Change-Id: If966331b4daa5a88be61fb2efea65a4b69495b0b
Signed-off-by: Colin Dixon <colin@colindixon.com>
5 years agoFix missing bundle 48/35148/1
Robert Varga [Sun, 21 Feb 2016 15:33:04 +0000 (16:33 +0100)]
Fix missing bundle

Change-Id: I9b8c0ca660e0101a2459f92dd16e36727f8ab9c3
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
5 years agoFix sporadic ShardManagerTest failures 28/34928/3
Tom Pantelis [Wed, 17 Feb 2016 18:55:20 +0000 (13:55 -0500)]
Fix sporadic ShardManagerTest failures

Some of the tests fail sporadically. Most were alleviated by:

  - using tell on an actor rather than calling receiveCommand directly
  - using the normal fork/join dispatcher for creating TestActors instead
    of the default CallingThread dispatcher.

After the changes the tests ran over 200 times successfully.

Change-Id: Ib2c7c3b6dace9e89dff54eccc58a2b8aabad75de
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoBinding Codecs support of APPEARED,DISAPPEARED. 58/35058/2
Tony Tkacik [Fri, 19 Feb 2016 10:55:13 +0000 (11:55 +0100)]
Binding Codecs support of APPEARED,DISAPPEARED.

In BE two new modification types were introduced for
structural containers, but binding codecs were not
updated accordingly.

Frontend mapping is simple:
  APPEARED -> SUBTREE_MODIFIED
  DISAPPEARED -> DELETE

Change-Id: I62810c501234a62343150c328c6f2802402669c5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
5 years agoRemove target-ide override 51/35051/2
Robert Varga [Fri, 19 Feb 2016 09:55:09 +0000 (10:55 +0100)]
Remove target-ide override

This was here for historic reasons. The interaction between IDE and
command-line maven are under-defined and this does not really solve
anything.

Change-Id: I77978199113f458e483a87241bf267975b4d9de3
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMake sure yang-maven-plugin executes in eclipse 23/34823/2
Robert Varga [Wed, 17 Feb 2016 12:37:38 +0000 (13:37 +0100)]
Make sure yang-maven-plugin executes in eclipse

Turn ignore into execute.

Change-Id: I231d6ff528987d07488320b95db9342d37c02354
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoReduce reliance on NormalizedNodeInputStreamReader 51/34851/2
Robert Varga [Wed, 17 Feb 2016 16:55:57 +0000 (17:55 +0100)]
Reduce reliance on NormalizedNodeInputStreamReader

Use NormalizedNodeDataInput instead.

Change-Id: I8c16fcdd1f69354a2616fe89b5a368feea1d3090
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoHide NormalizedNodeOutputStreamWriter 47/34847/6
Robert Varga [Wed, 17 Feb 2016 15:17:32 +0000 (16:17 +0100)]
Hide NormalizedNodeOutputStreamWriter

This is an internal implementation class, hide it.

Change-Id: Ib79d5a48dcf967f832b7130b981e5c22a593ef80
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove InputStream constructors 41/34841/4
Robert Varga [Wed, 17 Feb 2016 16:30:42 +0000 (17:30 +0100)]
Remove InputStream constructors

These are not used anywhere, remove them and simplify callers.

Change-Id: I1b7f28c8fb73903da2c3ddfe59defba56c44e364
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoNormalizedNodeDataOutput should be AutoCloseable 46/34846/3
Robert Varga [Wed, 17 Feb 2016 15:13:09 +0000 (16:13 +0100)]
NormalizedNodeDataOutput should be AutoCloseable

We expect to use autocloseable in implementations, make sure this this
reflected upwards.

Change-Id: Ia7e6b27e514cf04e24b0cdf161510a035846ba12
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove implements NormalizedNodeStreamWriter declaration 45/34845/3
Robert Varga [Wed, 17 Feb 2016 15:11:40 +0000 (16:11 +0100)]
Remove implements NormalizedNodeStreamWriter declaration

AbstractNormalizedNodeDataOutput already implements this class, no need
to declare it twice.

Change-Id: I4b217d00fe8054ce777b91b35157443438e65a54
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove NormalizedNodeStreamReader 42/34842/2
Robert Varga [Wed, 17 Feb 2016 14:47:20 +0000 (15:47 +0100)]
Remove NormalizedNodeStreamReader

This class has been superseded by NormalizedNodeDataInput, remove it.

Change-Id: I11c915f4aff6ca217e096c42ba1115043a99a3ab
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFollow-up to protobuff deprecation 38/34638/11
Robert Varga [Sun, 14 Feb 2016 22:34:49 +0000 (23:34 +0100)]
Follow-up to protobuff deprecation

Mark elements dealing with compatibility as @Deprecated. Reduces the
warning surface significantly.

Change-Id: I969c7b185cf6fbf570fe4d4d0332cff60eb0e4ca
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove unused variant of newShardProps() 24/34624/12
Robert Varga [Sun, 14 Feb 2016 02:22:11 +0000 (03:22 +0100)]
Remove unused variant of newShardProps()

This signature is unused, remove it to squash an eclipse warning.

Change-Id: I804961bfded0734a02fd00fb69979bb8b5b8feab
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoAdd SendInstallSnapshot javadoc 18/34618/12
Robert Varga [Sun, 14 Feb 2016 00:31:46 +0000 (01:31 +0100)]
Add SendInstallSnapshot javadoc

First cut at describing mechanics. Also make the class final and
annonate nullness.

Change-Id: I94119ab818713110dfab199b0e3f9e9608cfd583
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoClean AbstractServerChangeReply up 22/34622/9
Robert Varga [Sun, 14 Feb 2016 01:32:58 +0000 (02:32 +0100)]
Clean AbstractServerChangeReply up

This is an abstract base class, make it abstract and non-instantiable
from outside of the world. It introduces public API, hence we cannot
hide it.

Also switch to using MoreObjects.ToStringHelper, as that allows us to
unify toString().

Change-Id: I21bdd4d0815a50393519414449c7e7eb7179b077
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBug 4627: Fix premature RO tx cleanup 57/34757/1
Tom Pantelis [Tue, 16 Feb 2016 04:45:36 +0000 (23:45 -0500)]
Bug 4627: Fix premature RO tx cleanup

For the RO tx PhantomReference cleanup mechanism, modified
RemoteTransactionContextSupport to pass the front-end client
TransactionProxy instance as the referent to the
FinalizablePhantomReference. Previously we were passing the
RemoteTransactionContextSupport instance which is only reachable via
a hard reference until the primary shard actor is obtained and thus may
be eligible for GC while the TransactionProxy is still in use.

Change-Id: Ib2808b4ba8113a5722f9ee422434a89adaf775fe
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoBug 4823: Use tx commit timeout for BatchedModifications 98/34298/3
Tom Pantelis [Mon, 8 Feb 2016 21:50:23 +0000 (16:50 -0500)]
Bug 4823: Use tx commit timeout for BatchedModifications

When sending BatchedModifications messages to the shard we use the
general operation timeout which is 5 sec. We should instead use the
transaction commit timeout to be consistent with the other transaction
messages (ReadyLocalTransaction, CanCommitTransaction etc).

Change-Id: I26bead59c29ee198f677838c5adb3614e3795a04
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoMake RequestVoteReply final 21/34621/6
Robert Varga [Sun, 14 Feb 2016 00:44:39 +0000 (01:44 +0100)]
Make RequestVoteReply final

Concrete message, it should never be subclassed.

Change-Id: Ie48a8cace763e1184ab47990136c5e5db3d453cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDocument RaftRPC 19/34619/5
Robert Varga [Sun, 14 Feb 2016 00:36:31 +0000 (01:36 +0100)]
Document RaftRPC

Add some basic javadocs.

Change-Id: I1cd1a37e3979c497705baf3a2b508c058f1022ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoTurn OperationState into an abstract class 17/34617/4
Robert Varga [Sun, 14 Feb 2016 00:06:03 +0000 (01:06 +0100)]
Turn OperationState into an abstract class

This is an internal state class, no need to make it an interface. This
should make for faster dispatch, as methods offsets in vtable are fixed.

Change-Id: I3438a17485104b43647c91b7c6272dad5862cbb9
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoTurn SendHeartBeat into a singleton 16/34616/4
Robert Varga [Sat, 13 Feb 2016 23:53:53 +0000 (00:53 +0100)]
Turn SendHeartBeat into a singleton

There is no additional data, turn it into a singleton.

Change-Id: I5d562d798d27ba80e2b4de31a16faae80a3eaad3
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoTurn LeaderTransitioning into a singleton 15/34615/4
Robert Varga [Sat, 13 Feb 2016 23:49:14 +0000 (00:49 +0100)]
Turn LeaderTransitioning into a singleton

The message does not carry any state and can be made a singleton.

Change-Id: Iadcbe0cb8de949dbc57240772bcfd9ddf23d42ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoHide IsolatedLeaderCheck message 14/34614/4
Robert Varga [Sat, 13 Feb 2016 23:44:36 +0000 (00:44 +0100)]
Hide IsolatedLeaderCheck message

IsolatedLeaderCheck is a Leader-internal implementation detail. Do not
publish it to the outside world. Since it does not carry any state, we
can replace it by a simple object instance.

Change-Id: I6f9061e8141f499c590fd079f6c57e39f8b022d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMake FollowerInitialSyncUpStatus final 13/34613/4
Robert Varga [Sat, 13 Feb 2016 23:24:06 +0000 (00:24 +0100)]
Make FollowerInitialSyncUpStatus final

Change-Id: Ie39c26f077311e0ec5b9dd9b8734bdfabf26b581
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoTurn ElectionTimeout into a proper singleton 12/34612/4
Robert Varga [Sat, 13 Feb 2016 23:19:41 +0000 (00:19 +0100)]
Turn ElectionTimeout into a proper singleton

There is no need to instantiate this object multiple times. Turn it into
a singleton. Also add a bit of javadocs.

Change-Id: Ied90a43ec297409b8074875d305d7f74e1b37ce4
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMake NOOP_CALLBACK internal constant 08/34608/5
Robert Varga [Sat, 13 Feb 2016 22:01:14 +0000 (23:01 +0100)]
Make NOOP_CALLBACK internal constant

There are no outside users, make this a proper final constant and hide
it.

Change-Id: I06638758787b3fd0994b5d51fb4f2b2e5718aa57
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBUG-5247: notify listeners for entities which are not owned 79/34179/19
Robert Varga [Fri, 5 Feb 2016 17:45:40 +0000 (18:45 +0100)]
BUG-5247: notify listeners for entities which are not owned

Rather than broadcasting just the 'up' state, notify listeners about all
state we know of.

Change-Id: Iaae6db925a321aad420fa0ee8bdf8b56b5d2a29e
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMake GetSnapshot final and add a link 07/34607/5
Robert Varga [Sat, 13 Feb 2016 21:32:40 +0000 (22:32 +0100)]
Make GetSnapshot final and add a link

With a private consructor, this class is really final. Also add a
Javadoc reference to the response message.

Change-Id: I2cf9cf7d4b750597ac2dc122ee9d6412831522bd
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix raw type warnings 56/34556/7
Robert Varga [Fri, 12 Feb 2016 12:28:25 +0000 (13:28 +0100)]
Fix raw type warnings

Fixes NodeWithValue and similar raw type warnings. Also imports
YangInstanceIdentifier inner interfaces for more readable code.

Change-Id: Iaff9e250fff26b0da70dd9f24d7ccc72121630e4
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDeprecate InstallSnapshot protobuff messages 68/33768/6
Tom Pantelis [Wed, 27 Jan 2016 07:33:32 +0000 (02:33 -0500)]
Deprecate InstallSnapshot protobuff messages

Deprecated the associated InstallSnapshot protobuff message and
changed InstallSnapshot to Externalizable. Backwards compatibility
with pre-boron is maintained. Related code was modified accordingly.

Previously InstallSnapshot took a ByteString. I changed this to byte[]
to avoid the extra copy overhead with ByteString with converting to and
from byte[].

Change-Id: I532d062983e76e63c685e6df1d48e0ae38197a5c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoReduce output from DeadlockMonitor 61/34561/2
Tom Pantelis [Fri, 12 Feb 2016 14:56:46 +0000 (09:56 -0500)]
Reduce output from DeadlockMonitor

If a module doesn't finish after 5 sec, the DeadlockMonitor starts
logging warning messages. However it does this every second. CDS will
wait up to 90 sec for all shards to elect a leader so the
DeadlockMonitor produces a lot of output during this period. To reduce
the noise I changed the sleep to use WARN_AFTER_MILLIS so the message is
logged every 5 sec.

Change-Id: I63842075dee1fc6a4fc4e4200cc089e33a110e78
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoRemove TransactionContext.supportsDirectCommit method 72/34472/2
Tom Pantelis [Wed, 10 Feb 2016 18:12:34 +0000 (13:12 -0500)]
Remove TransactionContext.supportsDirectCommit method

The supportsDirectCommit method was added for backwards compatibility
with pre-Lithium and thus can be removed to simplify the code. All the
current implementations return true.

Change-Id: I256e19b5c0b63a5371c70def72adc6c2a1427106
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoFix intermittent ShardTest failures 32/34632/2
Tom Pantelis [Sun, 14 Feb 2016 12:17:36 +0000 (07:17 -0500)]
Fix intermittent ShardTest failures

Some tests fail intermittenly due to modifying Shard state directly
instead of thru messages.

Change-Id: I704d6d23c1b2a47e78b3d8823a3136e921e9113b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoMake Shutdown message a proper singleton 06/34606/3
Robert Varga [Sat, 13 Feb 2016 21:27:47 +0000 (22:27 +0100)]
Make Shutdown message a proper singleton

It holds no state and thus can be readily reused.

Change-Id: I7aba9266a476ddb79f456ce66dd46697c2e5ddb5
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoCleanup and document FindLeaderReply 05/34605/4
Robert Varga [Sat, 13 Feb 2016 20:58:40 +0000 (21:58 +0100)]
Cleanup and document FindLeaderReply

Adds javadoc describing FindLeaderReply and makes getLeaderActor()
return an Optional<String> instead of null. Also eliminate switch log
errors via Logger, not println();

Change-Id: I7efc98b6e652d7e01192b9bb6e1bd4ad1c9d8b76
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDocument FindLeader message 04/34604/3
Robert Varga [Sat, 13 Feb 2016 20:48:08 +0000 (21:48 +0100)]
Document FindLeader message

Add Javadoc documentation and turn the message into a proper singleton,
as it does not currently hold any data.

Change-Id: Ib696b32234f048c4a9c7abb7a9972a00118219e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMake methods static 55/34555/2
Robert Varga [Fri, 12 Feb 2016 12:08:22 +0000 (13:08 +0100)]
Make methods static

These private methods can be made static, let's do that.

Change-Id: I275e465f3424ae87f7a2a5ddaaca1f09c5072685
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix intermittent LeaderTest/CandidateTest failures 44/34544/2
Tom Pantelis [Thu, 11 Feb 2016 08:24:53 +0000 (03:24 -0500)]
Fix intermittent LeaderTest/CandidateTest failures

The test cases in LeaderTest and CandidateTest have been failing
intermittently. A particular test in CandidateTest has recently started
failing fairly regularly on jenkins for some reason.

The common denominator is that an initial message to an actor isn't
received and goes to dead letters instead, even though the actor was
just created. This seems related to the use of ActorSelection in the raft
behavior classes, I suspect a timing issue where the underlying actor
isn't actually created/available yet via actorSelection. I had seen this
in the past and attempted to alleviate it by adding a verifyActorReady to
TestActorFactory to verify with retries that the actor can be obtained via
actorSelection.resolveOne. However it doesn't appear resolveOne works as
advertised or maybe a successful call doesn't mean a message will
succeed.

I changed verifyActorReady to send an Identify message to the
actorSelection and verify successful response. On my system LeaderTest
would usually fail within 30 test runs. After the change it ran
successfully 400 times.

Change-Id: I2da7d4a4d14c68810e87fc64b711b5c80608f5d7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoAdd raftVersion field to AppendEntriesReply 67/33767/6
Tom Pantelis [Tue, 26 Jan 2016 15:18:31 +0000 (10:18 -0500)]
Add raftVersion field to AppendEntriesReply

Added a raftVersion field to AppendEntriesReply and modified
AbstractLeader to store the raftVersion in the FollowerLogInformation.
This will enable sending the appropriate serialized version for
subsequent messages sent to the follower.

The raftVersion in the FollowerLogInformation is initialized to
0 (HELIUM_VERSION) so we assume the oldest version for backwards
compatibility until we get the first AppendEntriesReply with the
follower's actual version.

Since we're adding a new field to AppendEntriesReply this won't break
backwards compatibility as Java serialization handles that. The
raftVersion will be set to 0 if sent from a pre-boron version.

Change-Id: I4519c4f314674840f2578848b2888c3e8467dd21
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoBUG-5247: Fix Optional.get() on absent return 24/34524/2
Robert Varga [Thu, 11 Feb 2016 23:41:25 +0000 (00:41 +0100)]
BUG-5247: Fix Optional.get() on absent return

The following exception is seen:

testCloseCandidateRegistrationInQuickSuccession(org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest)  Time elapsed: 3.158 sec  <<< ERROR!
java.lang.IllegalStateException: Optional.get() cannot be called on an absent value
    at com.google.common.base.Absent.get(Absent.java:47)
    at org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest.testCloseCandidateRegistrationInQuickSuccession(DistributedEntityOwnershipIntegrationTest.java:404)

Change-Id: I3765a05a332f4abba550177ae5516eb2644ea94d
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBug 5153: Add timestamp to TransactionIdentifier 19/34019/4
Tom Pantelis [Wed, 3 Feb 2016 06:43:38 +0000 (01:43 -0500)]
Bug 5153: Add timestamp to TransactionIdentifier

TransactionIdentifiers are created locally but sent to the remote leader
so it's possible, after a restart, for the remote leader to see the same id
for 2 different txns since the local counter starts at 1. To alleviate
this I added a timestamp to TransactionIdentifier. I could've just used
a UUID but the counter is useful for debugging and a full UUID would
make the string version pretty long for logging. I think an additional
millisec timestamp is sufficient.

Change-Id: Iaabd3d25eb64dd14053f96336c48de90d4364678
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
5 years agoMake private methods static 90/34390/3
Robert Varga [Wed, 10 Feb 2016 12:15:10 +0000 (13:15 +0100)]
Make private methods static

These methods do not touch object state, make them static.

Change-Id: I9d29719cee7737ea8c36fa2e8fe39d4e245dd68c
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoShardTestKit.waitUntilLeader() is static 89/34389/3
Robert Varga [Wed, 10 Feb 2016 12:15:40 +0000 (13:15 +0100)]
ShardTestKit.waitUntilLeader() is static

Make its callers invoke it in a static way, without an instance.

Change-Id: Ic444a74af5c714b9b3e49ebc61fc97cf24d59d71
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix raw reference 92/34392/5
Robert Varga [Wed, 10 Feb 2016 12:34:27 +0000 (13:34 +0100)]
Fix raw reference

Class is generic, add <?> to method declaration.

Change-Id: Iab1dc09d9bbda553d326a1efe4356ae804a568df
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoNodeWithValue is generic 91/34391/4
Robert Varga [Wed, 10 Feb 2016 12:26:35 +0000 (13:26 +0100)]
NodeWithValue is generic

Add diamond contructor to fix eclipse warnings.

Change-Id: Ib7c35f70103a9dcb3fc101b91642c3822a242acb
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix raw type warnings 93/34393/5
Robert Varga [Wed, 10 Feb 2016 12:34:52 +0000 (13:34 +0100)]
Fix raw type warnings

AtomicFieldReferenceUpdater with generic classes causes a type safety
warning. Add raw type suppressions.

Change-Id: I8e27af2532f7fbc84a0e81bb046ffae4a10b2228
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoUse a singleton instead of an ArrayList 81/34181/4
Robert Varga [Fri, 5 Feb 2016 15:45:18 +0000 (16:45 +0100)]
Use a singleton instead of an ArrayList

Does not force instantiation on a backing array, hence it is
simpler/faster.

Change-Id: I0ab8af0b298e67fd571d7c4be0be5fca20cafbb3
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoSimplify listener management 80/34180/3
Robert Varga [Fri, 5 Feb 2016 15:14:39 +0000 (16:14 +0100)]
Simplify listener management

Instead of passing local fields as arguments, access the field directly.

Change-Id: I209f55644f81722f806aaf448a8e09e2c608f7cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoFix Eclipse errors with Java 8/Scala 87/34387/2
Robert Varga [Wed, 10 Feb 2016 11:37:38 +0000 (12:37 +0100)]
Fix Eclipse errors with Java 8/Scala

This adds workarounds for ambiguous method error reported by Eclipse.
The issue is reported and analyzed at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=468276. This patch adds
alternative use of methods which trigger the behavior.

Change-Id: If463d4567e3555efff8e11b39e8708d0e51838c1
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRefactor VersionedExternalizableMessage messages 71/33871/2
Gary Wu [Tue, 2 Feb 2016 00:45:25 +0000 (16:45 -0800)]
Refactor VersionedExternalizableMessage messages

Refactor VersionedExternalizableMessage messages
to centralize version checking in toSerializable().

Change-Id: I6ad4477eb16e104ab801205842875efa164817af
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
5 years agoRemove deprecated Helium Payload methods 10/33510/7
Tom Pantelis [Sun, 24 Jan 2016 05:44:09 +0000 (00:44 -0500)]
Remove deprecated Helium Payload methods

Removed the deprecated encode/decode methods from Payload and its derived
classes.

Change-Id: I52beb2d3991efe9f3a7c2631b8682dc1f324e271
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.