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

net.sf.ehcache.management.service.EntityResourceFactory 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
package net.sf.ehcache.management.service;

import net.sf.ehcache.management.resource.CacheConfigEntity;
import net.sf.ehcache.management.resource.CacheEntity;
import net.sf.ehcache.management.resource.CacheManagerConfigEntity;
import net.sf.ehcache.management.resource.CacheManagerEntity;
import net.sf.ehcache.management.resource.CacheStatisticSampleEntity;

import org.terracotta.management.ServiceExecutionException;

import java.util.Collection;
import java.util.Set;

/**
 * A factory interface for resources related to Ehcache.
 *
 * @author brandony
 */
public interface EntityResourceFactory {

  /**
   * A factory method for {@link CacheManagerEntity} objects.
   *
   * @param cacheManagerNames a {@code Set} of names for the CacheManager objects to be represented by the
   *                          returned resources
   * @param attributes        a {@code Set} of specific cache manager attributes to include in the returned representations;
   *                          if null, all attributes will be included
   * @return a {@code Collection} of {@code CacheManagerEntity} objects
   */
  Collection createCacheManagerEntities(Set cacheManagerNames,
                                                            Set attributes) throws ServiceExecutionException;

  /**
   * A factory method for {@link CacheManagerConfigEntity} objects.
   *
   * @param cacheManagerNames a {@code Set} of names for the CacheManager configurations to be represented by the
   *                          returned resources
   * @return a {@code Collection} of {@code CacheManagerConfigEntity} objects
   */
  Collection createCacheManagerConfigEntities(Set cacheManagerNames) throws ServiceExecutionException;

  /**
   * A factory method for {@link CacheEntity} objects.
   *
   * @param cacheManagerNames a {@code Set} of names for the CacheManagers that manage the Cache
   *                          objects to be represented by the returned resources
   * @param cacheNames        a {@code Set} of names for the Cache objects to be represented by the
   *                          returned resources
   * @param attributes        a {@code Set} of specific cache manager attributes to include in the returned representations;
   *                          if null, all attributes will be included
   * @return a {@code Collection} of {@code CacheEntity} objects
   */
  Collection createCacheEntities(Set cacheManagerNames,
                                              Set cacheNames,
                                              Set attributes) throws ServiceExecutionException;

  /**
   * A factory method for {@link CacheConfigEntity} objects.
   *
   * @param cacheManagerNames a {@code Set} of names for the CacheManagers that manage the Cache
   *                          objects to be represented by the returned resources
   * @param cacheNames        a {@code Set} of names for the Cache objects to be represented by the
   *                          returned resources
   * @return a {@code Collection} of {@code CacheConfigEntity} objects
   */
  Collection createCacheConfigEntities(Set cacheManagerNames,
                                                          Set cacheNames) throws ServiceExecutionException;

  /**
   * A factory method for {@link CacheStatisticSampleEntity} objects.
   *
   * @param cacheManagerNames a {@code Set} of names for the CacheManagers that manage the Caches whose
   *                          sampled statistics are to be represented by the returned resources
   * @param cacheNames        a {@code Set} of names for the Caches whose sampled statistics are to be represented
   *                          by the returned resources
   * @param statNames         a {@code Set} of names for the sampled statistics to be represented by the returned resources
   * @return a {@code Collection} of {@code CacheStatisticSampleEntity} objects
   */
  Collection createCacheStatisticSampleEntity(Set cacheManagerNames,
                                                                          Set cacheNames,
                                                                          Set statNames) throws ServiceExecutionException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy