mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
added CacheConfigurationReader for GuavaCacheManager
This commit is contained in:
@@ -33,6 +33,7 @@ package sonia.scm.cache;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
@@ -49,6 +50,28 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
public class CacheManagerConfiguration
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*/
|
||||
public CacheManagerConfiguration() {}
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param defaultCache
|
||||
* @param caches
|
||||
*/
|
||||
public CacheManagerConfiguration(CacheConfiguration defaultCache,
|
||||
List<NamedCacheConfiguration> caches)
|
||||
{
|
||||
this.defaultCache = defaultCache;
|
||||
this.caches = caches;
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -57,6 +80,9 @@ public class CacheManagerConfiguration
|
||||
*/
|
||||
public List<NamedCacheConfiguration> getCaches()
|
||||
{
|
||||
if ( caches == null ){
|
||||
caches = Collections.EMPTY_LIST;
|
||||
}
|
||||
return caches;
|
||||
}
|
||||
|
||||
@@ -78,6 +104,6 @@ public class CacheManagerConfiguration
|
||||
private List<NamedCacheConfiguration> caches;
|
||||
|
||||
/** Field description */
|
||||
@XmlElement(name = "cache")
|
||||
@XmlElement(name = "defaultCache")
|
||||
private CacheConfiguration defaultCache;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user