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

A product library implementing the ehcache management resource service interfaces and integrating with ehcache to construct the relevant management resource entities.

There is a newer version: 2.8.9
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 {@link 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 {@link 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 {@link CacheManager}s that manage the {@link Cache}
   *                          objects to be represented by the returned resources
   * @param cacheNames        a {@code Set} of names for the {@link 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 {@link CacheManager}s that manage the {@link Cache}
   *                          objects to be represented by the returned resources
   * @param cacheNames        a {@code Set} of names for the {@link 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 {@link CacheManager}s that manage the {@link Cache}s whose
   *                          sampled statistics are to be represented by the returned resources
   * @param cacheNames        a {@code Set} of names for the {@link Cache}s 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