Introducing caching

Fix #832 #752

Adds caching capabilities to the converter. Remote calls to the
registry, Schema Parsing and toString were very expensive operations
that are now being cached

Adds a decorator to the registryClient that allows caching of remote
invocations.

Fixing review comments
This commit is contained in:
Vinicius Carvalho
2017-02-23 08:55:51 -05:00
committed by Marius Bogoevici
parent a67fe02fd7
commit 4cd9b0c3ec
15 changed files with 423 additions and 74 deletions

View File

@@ -8,7 +8,9 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-stream-schema</artifactId>
<properties>
<avro.version>1.8.1</avro.version>
</properties>
<dependencies>
<dependency>
@@ -28,7 +30,7 @@
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.8.1</version>
<version>${avro.version}</version>
<optional>true</optional>
</dependency>
<dependency>
@@ -47,4 +49,26 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
<goals>
<goal>schema</goal>
</goals>
</execution>
</executions>
<configuration>
<testOutputDirectory>${project.basedir}/target/generated-test-sources</testOutputDirectory>
<testSourceDirectory>${project.basedir}/src/test/resources/schemas</testSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>