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

org.infinispan.configuration.global.ScheduledExecutorFactoryConfiguration Maven / Gradle / Ivy

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

import org.infinispan.commons.configuration.AbstractTypedPropertiesConfiguration;
import org.infinispan.commons.configuration.attributes.Attribute;
import org.infinispan.commons.configuration.attributes.AttributeDefinition;
import org.infinispan.commons.configuration.attributes.AttributeSet;
import org.infinispan.executors.DefaultScheduledExecutorFactory;
import org.infinispan.executors.ScheduledExecutorFactory;

public class ScheduledExecutorFactoryConfiguration extends AbstractTypedPropertiesConfiguration {
   static final AttributeDefinition FACTORY = AttributeDefinition.builder("factory", (ScheduledExecutorFactory)new DefaultScheduledExecutorFactory()).immutable().build();

   public static AttributeSet attributeDefinitionSet() {
      return new AttributeSet(ExecutorFactoryConfiguration.class, AbstractTypedPropertiesConfiguration.attributeSet(), FACTORY);
   }

   private final Attribute factory;

   ScheduledExecutorFactoryConfiguration(AttributeSet attributes) {
      super(attributes);
      factory = attributes.attribute(FACTORY);
   }

   public ScheduledExecutorFactory factory() {
      return factory.get();
   }

   AttributeSet attributes() {
      return attributes;
   }

   @Override
   public String toString() {
      return "ScheduledExecutorFactoryConfiguration [attributes=" + attributes + "]";
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy