Rework TypedRowInvocationHandler invocation path 22/86222/4
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 1 Dec 2019 13:34:50 +0000 (14:34 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 5 Dec 2019 16:56:48 +0000 (17:56 +0100)
commit9930827c44f058d16b389d62ac8bc350eaa47d81
treea6528309000d2bb901d33e82db119f123a3a209d
parentc6f7bc7bcc0ed158e04111b0b69fbd0c4702a132
Rework TypedRowInvocationHandler invocation path

Performing schema lookup/validation is something we usually do only
once for a particular schema and then we can freely perform invocation.

Introduce MethodDispatch{Invoker,Prototype} constructs. MethodDispatch
serves as a the result of reflective analysis of a particular access
class.

When TypedDatabaseSchema accesses that class, the MethodDispatch
is loaded from a global cache and is bound to the schema, resulting
in an Invoker map. That map is then used to dispatch InvocationHandler
requests to the appropriate logic.

Change-Id: Ic97751992fea97b01a6fcfd124edbe783bc86e1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 726107ed803ed48519e256e6f274e543ff6def25)
library/impl/pom.xml
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/SchemaVersionMismatchException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/GetColumn.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/GetData.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/GetRow.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/GetTable.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/MethodDispatch.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/SetData.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedDatabaseSchemaImpl.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedRowInvocationHandler.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TyperUtils.java