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

org.infinispan.factories.DistributionManagerFactory Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.factories;

import org.infinispan.distribution.DistributionManager;
import org.infinispan.distribution.impl.DistributionManagerImpl;
import org.infinispan.factories.annotations.DefaultFactoryFor;

@DefaultFactoryFor(classes = DistributionManager.class)
public class DistributionManagerFactory extends AbstractNamedCacheComponentFactory implements AutoInstantiableFactory {
   @Override
   @SuppressWarnings("unchecked")
   public  T construct(Class componentType) {
      if (configuration.clustering().cacheMode().isDistributed() || configuration.clustering().cacheMode().isReplicated())
         return (T) new DistributionManagerImpl();
      else
         return null;
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy