Skip to content

Commit

Permalink
Merge 66a2c8e into 331fbbb
Browse files Browse the repository at this point in the history
  • Loading branch information
malafeev committed Jul 22, 2019
2 parents 331fbbb + 66a2c8e commit db3ae10
Show file tree
Hide file tree
Showing 14 changed files with 16,815 additions and 0 deletions.
58 changes: 58 additions & 0 deletions opentracing-redis-lettuce5.0/pom.xml
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2017-2019 The OpenTracing Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>opentracing-redis-parent</artifactId>
<groupId>io.opentracing.contrib</groupId>
<version>0.1.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>opentracing-redis-lettuce5.0</artifactId>
<name>OpenTracing Instrumentation for Lettuce 5.0 Redis Client</name>
<description>OpenTracing Instrumentation for Lettuce 5.0 Redis Client</description>

<dependencies>

<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-redis-common</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
<version>5.0.5.RELEASE</version>
</dependency>

<dependency>
<groupId>com.github.kstyrc</groupId>
<artifactId>embedded-redis</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
@@ -0,0 +1,37 @@
/*
* Copyright 2017-2019 The OpenTracing Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package io.opentracing.contrib.redis.lettuce;

import io.lettuce.core.RedisFuture;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

public class CompletableRedisFuture<T> extends CompletableFuture<T> implements RedisFuture<T> {

private RedisFuture<T> wrappedFuture;

public CompletableRedisFuture(RedisFuture<T> wrappedFuture) {
this.wrappedFuture = wrappedFuture;
}

@Override
public String getError() {
return wrappedFuture.getError();
}

@Override
public boolean await(long timeout, TimeUnit unit) throws InterruptedException {
return wrappedFuture.await(timeout, unit);
}
}

0 comments on commit db3ae10

Please sign in to comment.