All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.otto.synapse.state.DelegatingStateRepository Maven / Gradle / Ivy

Go to download

A library used at otto.de to implement Spring Boot based event-sourcing microservices.

There is a newer version: 0.33.1
Show newest version
package de.otto.synapse.state;

import java.util.Optional;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;

public class DelegatingStateRepository implements StateRepository {

    private final StateRepository delegate;

    public DelegatingStateRepository(final StateRepository delegate) {
        this.delegate = delegate;
    }

    @Override
    public String getName() {
        return delegate.getName();
    }

    @Override
    public Optional compute(String key, BiFunction, ? extends V> remappingFunction) {
        return delegate.compute(key, remappingFunction);
    }

    @Override
    public void consumeAll(BiConsumer consumer) {
        delegate.consumeAll(consumer);
    }

    @Override
    public Optional put(String key, V value) {
        return delegate.put(key,value);
    }

    @Override
    public Optional remove(String key) {
        return delegate.remove(key);
    }

    @Override
    public void clear() {
        delegate.clear();
    }

    @Override
    public Optional get(String key) {
        return delegate.get(key);
    }

    @Override
    public Set keySet() {
        return delegate.keySet();
    }

    @Override
    public long size() {
        return delegate.size();
    }

    @Override
    public void close() throws Exception {
        delegate.close();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy