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

com.noenv.rxjava3.wiremongo.WireMongo Maven / Gradle / Ivy

There is a newer version: 4.5.10
Show newest version
package com.noenv.rxjava3.wiremongo;

import com.noenv.wiremongo.WireMongoCommands;
import com.noenv.wiremongo.mapping.Mapping;
import io.reactivex.rxjava3.core.Completable;
import io.vertx.rxjava3.core.Vertx;
import io.vertx.rxjava3.impl.AsyncResultCompletable;

public class WireMongo implements WireMongoCommands {

  private final com.noenv.wiremongo.WireMongo delegate;

  public WireMongo() {
    this(new com.noenv.wiremongo.WireMongo());
  }

  public WireMongo(Vertx vertx) {
    this(new com.noenv.wiremongo.WireMongo(vertx.getDelegate()));
  }

  public WireMongo(com.noenv.wiremongo.WireMongo delegate) {
    this.delegate = delegate;
  }

  public com.noenv.wiremongo.WireMongo getDelegate() {
    return delegate;
  }

  public WireMongoClient getClient() {
    return new WireMongoClient(delegate.getClient());
  }

  public Completable readFileMappings() {
    return AsyncResultCompletable.toCompletable(f -> delegate.readFileMappings().onComplete(f));
  }

  public Completable readFileMappings(String path) {
    return AsyncResultCompletable.toCompletable(f -> delegate.readFileMappings(path).onComplete(f));
  }

  public WireMongo clear() {
    delegate.clear();
    return this;
  }

  @Override
  public > T addMapping(T mapping) {
    return delegate.addMapping(mapping);
  }

  @Override
  public > boolean removeMapping(T mapping) {
    return delegate.removeMapping(mapping);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy