Class ResourceConfig
- java.lang.Object
-
- com.tangosol.coherence.rest.config.ResourceConfig
-
public class ResourceConfig extends Object
The ResourceConfig class encapsulates information related to a Coherence REST resource.- Author:
- vp 2011.07.08
-
-
Constructor Summary
Constructors Constructor Description ResourceConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected KeyConvertercreateKeyConverter()Create key converter instance.StringgetCacheName()Determine the name of the cache.ClassgetKeyClass()Determine the class of the cache key.KeyConvertergetKeyConverter()Return a KeyConverter instance for this resource.Map<String,Class>getMarshallerMap()Return a map of marshaller classes keyed by media type.intgetMaxResults()Return the max size of result set this resource is allowed to return.QueryConfiggetQueryConfig()Return the query configuration for this resource.ClassgetValueClass()Determine the class of the cached values.voidsetCacheName(String sName)Set the name of the cache.voidsetKeyClass(Class clz)Set the key class.voidsetKeyConverterClass(Class clz)Set the key converter class.voidsetMarshallerMap(Map<String,Class> map)Set the map of marshaller classes keyed by media type.voidsetMaxResults(int cMaxResults)Set the max size of result set this resource is allowed to return.voidsetQueryConfig(QueryConfig config)Set the query configuration for this resource.voidsetValueClass(Class clz)Set the value class.
-
-
-
Method Detail
-
getCacheName
public String getCacheName()
Determine the name of the cache.- Returns:
- the cache name
-
setCacheName
public void setCacheName(String sName)
Set the name of the cache.- Parameters:
sName- the cache name
-
getKeyClass
public Class getKeyClass()
Determine the class of the cache key.- Returns:
- the key class
-
setKeyClass
public void setKeyClass(Class clz)
Set the key class.- Parameters:
clz- the key class
-
getValueClass
public Class getValueClass()
Determine the class of the cached values.- Returns:
- the value class
-
setValueClass
public void setValueClass(Class clz)
Set the value class.- Parameters:
clz- the value class
-
setKeyConverterClass
public void setKeyConverterClass(Class clz)
Set the key converter class.- Parameters:
clz- the key converter class
-
getKeyConverter
public KeyConverter getKeyConverter()
Return a KeyConverter instance for this resource.- Returns:
- key converter instance
-
getMarshallerMap
public Map<String,Class> getMarshallerMap()
Return a map of marshaller classes keyed by media type.- Returns:
- a map of REST marshaller classes keyed by media type
-
setMarshallerMap
public void setMarshallerMap(Map<String,Class> map)
Set the map of marshaller classes keyed by media type.- Parameters:
map- a map of marshaller classes keyed by media type
-
getMaxResults
public int getMaxResults()
Return the max size of result set this resource is allowed to return.- Returns:
- the max size of result set allowed for this resource
-
setMaxResults
public void setMaxResults(int cMaxResults)
Set the max size of result set this resource is allowed to return.- Parameters:
cMaxResults- max size of result set this resource is allowed to return
-
getQueryConfig
public QueryConfig getQueryConfig()
Return the query configuration for this resource.- Returns:
- a QueryConfig instance
-
setQueryConfig
public void setQueryConfig(QueryConfig config)
Set the query configuration for this resource.- Parameters:
config- the query configuration
-
createKeyConverter
protected KeyConverter createKeyConverter()
Create key converter instance.- Returns:
- key converter instance
-
-