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

org.infinispan.hotrod.HotRod Maven / Gradle / Ivy

package org.infinispan.hotrod;

import org.infinispan.api.Infinispan;
import org.infinispan.hotrod.configuration.HotRodConfiguration;
import org.infinispan.hotrod.impl.HotRodTransport;

/**
 * @since 14.0
 **/
public class HotRod implements Infinispan {
   final HotRodConfiguration configuration;
   final HotRodTransport transport;

   HotRod(HotRodConfiguration configuration) {
      this(configuration, new HotRodTransport(configuration));
   }

   HotRod(HotRodConfiguration configuration, HotRodTransport transport) {
      this.configuration = configuration;
      this.transport = transport;
      this.transport.start();
   }

   @Override
   public HotRodSyncContainer sync() {
      return new HotRodSyncContainer(this);
   }

   @Override
   public HotRodAsyncContainer async() {
      return new HotRodAsyncContainer(this);
   }

   @Override
   public HotRodMutinyContainer mutiny() {
      return new HotRodMutinyContainer(this);
   }

   @Override
   public void close() {
      transport.close();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy