Examples of async()


Examples of org.focusns.common.event.annotation.Event.async()

            //
            Executor executor = getTaskExecutor();
            final EventContext eventContext = (EventContext) appEvent;
            Event event = eventContext.getEventHandler().getAnnotation(Event.class);
            //
            if (event.async()) {
                getTaskExecutor().execute(new Runnable() {
                    @Override
                    public void run() {
                        eventListener.onApplicationEvent(eventContext);
                    }
View Full Code Here

Examples of org.infinispan.config.FluentConfiguration.async()

            if (indexing.isEnabled()) {
                fluent.indexing().indexLocalOnly(indexing.isLocalOnly());
            }
        }
        if (cache.hasDefined(ModelKeys.QUEUE_SIZE)) {
            fluent.async().replQueueMaxElements(cache.get(ModelKeys.QUEUE_SIZE).asInt());
        }
        if (cache.hasDefined(ModelKeys.QUEUE_FLUSH_INTERVAL)) {
            fluent.async().replQueueInterval(cache.get(ModelKeys.QUEUE_FLUSH_INTERVAL).asLong());
        }
        if (cache.hasDefined(ModelKeys.REMOTE_TIMEOUT)) {
View Full Code Here

Examples of org.infinispan.config.FluentConfiguration.async()

        }
        if (cache.hasDefined(ModelKeys.QUEUE_SIZE)) {
            fluent.async().replQueueMaxElements(cache.get(ModelKeys.QUEUE_SIZE).asInt());
        }
        if (cache.hasDefined(ModelKeys.QUEUE_FLUSH_INTERVAL)) {
            fluent.async().replQueueInterval(cache.get(ModelKeys.QUEUE_FLUSH_INTERVAL).asLong());
        }
        if (cache.hasDefined(ModelKeys.REMOTE_TIMEOUT)) {
            fluent.sync().replTimeout(cache.get(ModelKeys.REMOTE_TIMEOUT).asLong());
        }
        if (cache.hasDefined(ModelKeys.OWNERS)) {
View Full Code Here

Examples of org.infinispan.config.FluentConfiguration.async()

        super.processModelNode(cache, configuration, additionalDeps);

        // process clustered cache attributes and elements
        FluentConfiguration fluent = configuration.fluent();
        if (cache.hasDefined(ModelKeys.QUEUE_SIZE)) {
            fluent.async().replQueueMaxElements(cache.get(ModelKeys.QUEUE_SIZE).asInt());
        }
        if (cache.hasDefined(ModelKeys.QUEUE_FLUSH_INTERVAL)) {
            fluent.async().replQueueInterval(cache.get(ModelKeys.QUEUE_FLUSH_INTERVAL).asLong());
        }
        // TODO  - need to check cache mode before setting
View Full Code Here

Examples of org.infinispan.config.FluentConfiguration.async()

        FluentConfiguration fluent = configuration.fluent();
        if (cache.hasDefined(ModelKeys.QUEUE_SIZE)) {
            fluent.async().replQueueMaxElements(cache.get(ModelKeys.QUEUE_SIZE).asInt());
        }
        if (cache.hasDefined(ModelKeys.QUEUE_FLUSH_INTERVAL)) {
            fluent.async().replQueueInterval(cache.get(ModelKeys.QUEUE_FLUSH_INTERVAL).asLong());
        }
        // TODO  - need to check cache mode before setting
        if (cache.hasDefined(ModelKeys.REMOTE_TIMEOUT)) {
            // fluent.sync().replTimeout(cache.get(ModelKeys.REMOTE_TIMEOUT).asLong());
        }
View Full Code Here

Examples of org.infinispan.configuration.cache.CacheStoreConfiguration.async()

      if (tmpLoader != null) {
         if (cfg instanceof CacheStoreConfiguration) {
            CacheStore tmpStore = (CacheStore) tmpLoader;
            // async?
            CacheStoreConfiguration cfg2 = (CacheStoreConfiguration) cfg;
            if (cfg2.async().enabled()) {
               tmpStore = createAsyncStore(tmpStore);
               tmpLoader = tmpStore;
            }

            // read only?
View Full Code Here

Examples of org.infinispan.configuration.cache.CacheStoreConfigurationBuilder.async()

      ConfigurationBuilder config = new ConfigurationBuilder();
      config.expiration().wakeUpInterval(100);
      config.eviction().maxEntries(1).strategy(EvictionStrategy.LRU);
      CacheStoreConfigurationBuilder store = config.loaders().passivation(passivation).addStore().cacheStore(new LockableCacheStore());
      if (USE_ASYNC_STORE)
         store.async().enable().threadPoolSize(threads);
      return config;
   }

   private final static ThreadLocal<LockableCacheStore> STORE = new ThreadLocal<LockableCacheStore>();
View Full Code Here

Examples of org.infinispan.configuration.cache.ClusteringConfiguration.async()

public class ReplicationQueueFactory extends EmptyConstructorNamedCacheFactory implements AutoInstantiableFactory {
   @Override
   @SuppressWarnings("unchecked")
   public <T> T construct(Class<T> componentType) {
      ClusteringConfiguration clustering = configuration.clustering();
      if ((!clustering.cacheMode().isSynchronous()) && clustering.async().useReplQueue()) {
         ReplicationQueue replQueue = clustering.async().replQueue();
         return replQueue != null ? componentType.cast(replQueue) : (T) new ReplicationQueueImpl();
      } else {
         return null;
      }
View Full Code Here

Examples of org.infinispan.configuration.cache.ClusteringConfiguration.async()

   @Override
   @SuppressWarnings("unchecked")
   public <T> T construct(Class<T> componentType) {
      ClusteringConfiguration clustering = configuration.clustering();
      if ((!clustering.cacheMode().isSynchronous()) && clustering.async().useReplQueue()) {
         ReplicationQueue replQueue = clustering.async().replQueue();
         return replQueue != null ? componentType.cast(replQueue) : (T) new ReplicationQueueImpl();
      } else {
         return null;
      }
   }
View Full Code Here

Examples of org.infinispan.configuration.cache.FileCacheStoreConfiguration.async()

            assert !c.loaders().shared();
            assert c.loaders().cacheLoaders().size() == 1;
            FileCacheStoreConfiguration fcsc = (FileCacheStoreConfiguration) c.loaders().cacheLoaders().get(0);
            assert fcsc.purgeOnStartup();
            assert fcsc.location().equals("nc");
            assert fcsc.async().enabled();
            assert fcsc.async().flushLockTimeout() == 1;
            assert fcsc.async().modificationQueueSize() == 1024;
            assert fcsc.async().shutdownTimeout() == 25000;
            assert fcsc.async().threadPoolSize() == 1;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.