|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.client.support.RestGatewaySupport org.springframework.data.keyvalue.riak.core.AbstractRiakTemplate
public abstract class AbstractRiakTemplate
Base class for RiakTemplates that defines basic behaviour common to both kinds of templates (Key/Value and Bucket/Key/Value).
Field Summary | |
---|---|
protected List<BucketKeyResolver> |
bucketKeyResolvers
A list of resolvers to turn a single object into a BucketKeyPair . |
protected ConcurrentSkipListMap<BucketKeyPair,RiakValue<?>> |
cache
For caching objects based on ETags. |
protected ConversionService |
conversionService
For converting objects to/from other kinds of objects. |
protected QosParameters |
defaultQosParameters
The default QosParameters to use for all operations through this template. |
protected String |
defaultUri
The URI to use inside the RestTemplate. |
protected ExecutorService |
executorService
ExecutorService to use for running asynchronous jobs. |
protected static boolean |
groovyPresent
Do we need to handle Groovy strings in the Jackson JSON processor? |
protected static SimpleDateFormat |
httpDate
For getting a java.util.Date from the Last-Modified header. |
protected org.slf4j.Logger |
log
|
protected String |
mapReduceUri
The URI for the Riak Map/Reduce API. |
protected static Pattern |
prefix
Regex used to extract host, port, and prefix from the given URI. |
protected static String |
RIAK_CLIENT_ID
Client ID used by Riak to correlate updates. |
protected boolean |
useCache
Whether or not to use the ETag-based cache. |
Fields inherited from class org.springframework.web.client.support.RestGatewaySupport |
---|
logger |
Constructor Summary | |
---|---|
AbstractRiakTemplate()
Take all the defaults. |
|
AbstractRiakTemplate(ClientHttpRequestFactory requestFactory)
Use the specified ClientHttpRequestFactory . |
Method Summary | ||
---|---|---|
void |
afterPropertiesSet()
|
|
protected
|
checkCache(K key,
Class<T> requiredType)
|
|
protected MediaType |
extractMediaType(Object value)
|
|
protected RiakMetaData |
extractMetaData(HttpHeaders headers)
|
|
protected String |
extractQosParameters(QosParameters qosParams)
Get a string that represents the QOS parameters, taken either from the specified object or from the template defaults. |
|
ConversionService |
getConversionService()
|
|
QosParameters |
getDefaultQosParameters()
|
|
String |
getDefaultUri()
|
|
ExecutorService |
getExecutorService()
|
|
String |
getHost()
|
|
String |
getMapReduceUri()
|
|
Integer |
getPort()
|
|
String |
getPrefix()
Extract the prefix from the URI for use in creating links. |
|
boolean |
isUseCache()
|
|
protected BucketKeyPair |
resolveBucketKeyPair(Object key,
Object val)
|
|
void |
setConversionService(ConversionService conversionService)
Specify the conversion service to use. |
|
void |
setDefaultQosParameters(QosParameters defaultQosParameters)
|
|
void |
setDefaultUri(String defaultUri)
|
|
void |
setExecutorService(ExecutorService executorService)
|
|
void |
setMapReduceUri(String mapReduceUri)
|
|
void |
setUseCache(boolean useCache)
|
Methods inherited from class org.springframework.web.client.support.RestGatewaySupport |
---|
getRestTemplate, setRestTemplate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String RIAK_CLIENT_ID
protected static final Pattern prefix
protected static final boolean groovyPresent
protected static SimpleDateFormat httpDate
java.util.Date
from the Last-Modified header.
protected final org.slf4j.Logger log
protected ConversionService conversionService
protected ConcurrentSkipListMap<BucketKeyPair,RiakValue<?>> cache
protected boolean useCache
protected ExecutorService executorService
ExecutorService
to use for running asynchronous jobs.
protected String defaultUri
protected String mapReduceUri
protected List<BucketKeyResolver> bucketKeyResolvers
BucketKeyPair
.
protected QosParameters defaultQosParameters
Constructor Detail |
---|
public AbstractRiakTemplate()
public AbstractRiakTemplate(ClientHttpRequestFactory requestFactory)
ClientHttpRequestFactory
.
requestFactory
- Method Detail |
---|
public ConversionService getConversionService()
public void setConversionService(ConversionService conversionService)
conversionService
- public String getDefaultUri()
public void setDefaultUri(String defaultUri)
public String getMapReduceUri()
public void setMapReduceUri(String mapReduceUri)
public boolean isUseCache()
public void setUseCache(boolean useCache)
public QosParameters getDefaultQosParameters()
public void setDefaultQosParameters(QosParameters defaultQosParameters)
public String getHost()
public Integer getPort()
public String getPrefix()
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService executorService)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected BucketKeyPair resolveBucketKeyPair(Object key, Object val)
protected MediaType extractMediaType(Object value)
protected RiakMetaData extractMetaData(HttpHeaders headers) throws IOException
IOException
protected <K,T> T checkCache(K key, Class<T> requiredType)
protected String extractQosParameters(QosParameters qosParams)
qosParams
-
|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |