io.opentracing.contrib.redis.redisson.TracingRMapReduce Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentracing-redis-redisson Show documentation
Show all versions of opentracing-redis-redisson Show documentation
OpenTracing Instrumentation for Redisson
/*
* 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.redisson;
import java.util.concurrent.TimeUnit;
import org.redisson.api.mapreduce.RMapReduce;
import org.redisson.api.mapreduce.RMapper;
import org.redisson.api.mapreduce.RReducer;
public class TracingRMapReduce extends
TracingRMapReduceExecutor implements
RMapReduce {
private final RMapReduce mapReduce;
private final TracingRedissonHelper tracingRedissonHelper;
public TracingRMapReduce(RMapReduce mapReduce,
TracingRedissonHelper tracingRedissonHelper) {
super(mapReduce, tracingRedissonHelper);
this.mapReduce = mapReduce;
this.tracingRedissonHelper = tracingRedissonHelper;
}
@Override
public RMapReduce timeout(long timeout, TimeUnit unit) {
return new TracingRMapReduce<>(mapReduce.timeout(timeout, unit), tracingRedissonHelper);
}
@Override
public RMapReduce mapper(
RMapper mapper) {
return new TracingRMapReduce<>(mapReduce.mapper(mapper), tracingRedissonHelper);
}
@Override
public RMapReduce reducer(
RReducer reducer) {
return new TracingRMapReduce<>(mapReduce.reducer(reducer), tracingRedissonHelper);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy