Modernize sal-remoterpc-connector Use instanceof patterns to reduce casts. Change-Id: Iafcb05461e2c241310857ee2bf93591bed66a7d4 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix modernization issues This fixes issues pointed out by Modernizer, which mostly boil down to using Objects.requireNonNull() and direct java.util collections. Change-Id: Id32530a6722cd101f96c23f6a745f91b2f09e2f9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Change remaining SnapshotSelectionCriteria to prioritize timestamp These are also needed and were missed in the original run-through. Change-Id: Icede0673c580f793ffe81ccecf728c15dc6e83ca Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Teach sal-remoterpc-connector to route actions sal-remoterpc-connector already handles routing of RPC registrations and invocations across a cluster. Actions are very similar to RPCs, hence it is natural to keep both in the same component. This patch refactors common bits that go into tracking both, so that we share common actors and concepts. JIRA: CONTROLLER-1894 Change-Id: I0b9005bc3560b4dd5977a280d83eceebe132bec9 Signed-off-by: EmmettCox <emmett.cox@est.tech>
Fix findbugs warnings Upgraded findbugs finds these, fix them up. Change-Id: Id5a008cddc6616c3a93f0528efca00b86843fc3c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove unused exceptions This drops exception declarations which are never used. Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Fix intermittent RemoteRpcRegistryMXBeanImplTest failures testFindRpcByRoute(org.opendaylight.controller.remote.rpc.registry.mbeans.RemoteRpcRegistryMXBeanImplTest) Time elapsed: 0.98 sec <<< ERROR! java.lang.IllegalStateException: Attempted to access local bucket before recovery completed at com.google.common.base.Preconditions.checkState(Preconditions.java:501) at org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreActor.getLocalBucket(BucketStoreActor.java:384) at org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreActor.getLocalData(BucketStoreActor.java:110) at org.opendaylight.controller.remote.rpc.registry.mbeans.RemoteRpcRegistryMXBeanImpl.findRpcByRoute(RemoteRpcRegistryMXBeanImpl.java:91) at org.opendaylight.controller.remote.rpc.registry.mbeans.RemoteRpcRegistryMXBeanImplTest.testFindRpcByRoute(RemoteRpcRegistryMXBeanImplTest.java:142) The problem is that the RemoteRpcRegistryMXBeanImpl access the enclosing RpcRegistry Actor instance directly and violates actor encapsulation. RemoteRpcRegistryMXBeanImpl should access the RpcRegistry via messages sent to its ActorRef. Change-Id: Icfd67c38e5d1bc3de283949207009d7aa34ab855 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Fix checkstyle problems not detected by the current version This change is required for overall move to new Checkstyle version, see https://git.opendaylight.org/gerrit/#/q/topic:bumpCheckstyle Most of the changes are redundant "final" modifiers. Change-Id: I637dd46617ca144f0ed33bd705c6357493b887fe Signed-off-by: David <david.suarez.fuentes@ericsson.com>
Bug 7840: Remove version in BucketStoreActor#removeBucket() Change-Id: Ic5d2c04260a0a53e72d9569eee18c1fba50c367b Signed-off-by: Vratko Polak <vrpolak@cisco.com>
BUG-7594: Rework sal-remoterpc-connector messages This breaks compatibility by using DOMRpcIdentifier directly in transferred messages. Since we are breaking compatibility, we can also rework the messages and their locations, limiting their visiblity and features (such as Serializable). RoutingTable no longer uses RouteIdentifier, but rather relies on DOMRpcIdentifier, which is serialized using NormalizedNodeDataInput/Output primitives, so the serialization format is not dependent on the package DOMRpcIdentifier comes from and can be compatibly switched to mdsal-provided one. Change-Id: Idf083f9d288be9c9684c7e8e8bd99fbaff0ad4ce Signed-off-by: Robert Varga <rovarga@cisco.com> Signed-off-by: Tomas Cere <tcere@cisco.com>