com.parthparekh.service
Class ServiceConfiguration

java.lang.Object
  extended by com.parthparekh.service.ServiceConfiguration

@Configuration
public class ServiceConfiguration
extends java.lang.Object

Configuration class


Field Summary
private  int cacheEnqueueTimeout
           
private  net.sf.ehcache.CacheManager cacheManager
           
private  int cacheReadTimeout
           
private  java.lang.String cacheType
           
private  int cacheWriteTimeout
           
private  java.lang.String couchbaseCacheConnectionURI
           
private  org.codehaus.jackson.map.ObjectMapper defaultObjectMapper
           
private  java.lang.String memcachedCacheConnectionURI
           
 
Constructor Summary
ServiceConfiguration()
           
 
Method Summary
 Cache getCache()
           
private  Cache getCouchbaseCache()
           
protected  Cache getEhCache()
           
private  Cache getMemcache()
           
 org.codehaus.jackson.map.ObjectMapper getObjectMapper()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheType

@Value(value="${cache.type:memcached}")
private java.lang.String cacheType

couchbaseCacheConnectionURI

@Value(value="${couchbase.cache.connection.uri}")
private java.lang.String couchbaseCacheConnectionURI

memcachedCacheConnectionURI

@Value(value="${memcached.cache.connection.uri}")
private java.lang.String memcachedCacheConnectionURI

cacheReadTimeout

@Value(value="${cache.read.timeout:500}")
private int cacheReadTimeout

cacheWriteTimeout

@Value(value="${cache.write.timeout:500}")
private int cacheWriteTimeout

cacheEnqueueTimeout

@Value(value="${cache.enqueue.timeout:500}")
private int cacheEnqueueTimeout

defaultObjectMapper

private org.codehaus.jackson.map.ObjectMapper defaultObjectMapper

cacheManager

@Autowired
private net.sf.ehcache.CacheManager cacheManager
Constructor Detail

ServiceConfiguration

public ServiceConfiguration()
Method Detail

getCache

@Bean(name="defaultCache")
public Cache getCache()
               throws java.io.IOException
Throws:
java.io.IOException

getCouchbaseCache

private Cache getCouchbaseCache()
                         throws java.io.IOException
Throws:
java.io.IOException

getMemcache

private Cache getMemcache()
                   throws java.io.IOException
Throws:
java.io.IOException

getEhCache

protected Cache getEhCache()
                    throws java.io.IOException
Throws:
java.io.IOException

getObjectMapper

@Bean(name="defaultObjectMapper")
public org.codehaus.jackson.map.ObjectMapper getObjectMapper()