Class CacheOptions
java.lang.Object
io.vertx.httpproxy.cache.CacheOptions
Cache options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault max size of the cache = 1000static final StringActual name of anonymous shared cache =__vertx.DEFAULTstatic final booleanDefault shared cache =false -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.CacheOptions(JsonObject json) Constructor to create an options from JSON.CacheOptions(CacheOptions other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetName()booleanisShared()setMaxSize(int maxSize) Set the max number of entries the cache can hold.Set the cache name, used when the cache is shared, otherwise ignored.setShared(boolean shared) Set totrueto share the cache.toJson()Convert to JSON.toString()
-
Field Details
-
DEFAULT_MAX_SIZE
public static final int DEFAULT_MAX_SIZEDefault max size of the cache = 1000- See Also:
-
DEFAULT_NAME
Actual name of anonymous shared cache =__vertx.DEFAULT- See Also:
-
DEFAULT_SHARED
public static final boolean DEFAULT_SHAREDDefault shared cache =false- See Also:
-
-
Constructor Details
-
CacheOptions
public CacheOptions()Default constructor. -
CacheOptions
-
CacheOptions
Constructor to create an options from JSON.- Parameters:
json- the JSON
-
-
Method Details
-
getMaxSize
public int getMaxSize()- Returns:
- the max number of entries the cache can hold.
-
setMaxSize
Set the max number of entries the cache can hold.- Parameters:
maxSize- the max size- Returns:
- a reference to this, so the API can be used fluently
-
getName
- Returns:
- the cache name used for sharing
-
setName
Set the cache name, used when the cache is shared, otherwise ignored.- Parameters:
name- the new name- Returns:
- a reference to this, so the API can be used fluently
-
toString
-
toJson
-