fix missing copy strategy in guava cache configuration

This commit is contained in:
Sebastian Sdorra
2013-04-12 08:48:32 +02:00
parent a33c3edf96
commit 69957ad36d
3 changed files with 135 additions and 3 deletions

View File

@@ -48,18 +48,22 @@ import java.util.Locale;
public enum CopyStrategy
{
NONE(false, false), READ(true, false), WRITE(false, true),
READWRITE(true, true);
NONE("none", false, false), READ("read", true, false),
WRITE("write", false, true), READWRITE("read-write", true, true);
/**
* Constructs ...
*
*
*
* @param configName
* @param copyOnRead
* @param copyOnWrite
*/
private CopyStrategy(boolean copyOnRead, boolean copyOnWrite)
private CopyStrategy(String configName, boolean copyOnRead,
boolean copyOnWrite)
{
this.configName = configName;
this.copyOnRead = copyOnRead;
this.copyOnWrite = copyOnWrite;
}
@@ -111,6 +115,21 @@ public enum CopyStrategy
: object;
}
//~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @return
*/
public String getConfigName()
{
return configName;
}
//~--- methods --------------------------------------------------------------
/**
* Method description
*
@@ -139,6 +158,9 @@ public enum CopyStrategy
//~--- fields ---------------------------------------------------------------
/** Field description */
private String configName;
/** Field description */
private boolean copyOnRead;