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

org.terracotta.modules.ehcache.async.AsyncCoordinator Maven / Gradle / Ivy

Go to download

Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache.

There is a newer version: 2.10.9.2
Show newest version
/*
 * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
 */
package org.terracotta.modules.ehcache.async;

import org.terracotta.modules.ehcache.async.scatterpolicies.ItemScatterPolicy;

import java.io.Serializable;

public interface AsyncCoordinator {

  /**
   * @throws IllegalArgumentException if processingConcurrency is less than 1 OR processor is null
   */
  public void start(final ItemProcessor processor, final int processingConcurrency,
                    ItemScatterPolicy policy);

  /**
   * @param item null item are ignored.
   */
  public void add(E item);

  /**
   * Stops and waits for the current processing to finish.
* Calling this multiple times will result in {@link IllegalStateException} */ public void stop(); /** * Sets a filter to filter out the items. */ public void setOperationsFilter(ItemsFilter filter); /** * @return the current items to be processed */ public long getQueueSize(); /** * Destroy all clustered state associated with the given async coordinator. */ void destroy(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy