net.sf.ehcache.management.service.EntityResourceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ehcache Show documentation
Show all versions of ehcache Show documentation
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.
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;
}