R
- The resourceA
- The resource attributesC
- The conversation servicepublic abstract class CachingServiceBase<R extends ServerResource,A extends com.threecrickets.prudence.internal.attributes.ResourceContextualAttributes,C extends ResourceConversationServiceBase<R>> extends Object
Modifier and Type | Field and Description |
---|---|
protected A |
attributes
The attributes.
|
protected com.threecrickets.prudence.internal.CachingUtil<R,A> |
cachingUtil
The caching utilities.
|
protected C |
conversationService
The conversation service.
|
protected DocumentService<A> |
documentService
The document service.
|
protected R |
resource
The resource.
|
Constructor and Description |
---|
CachingServiceBase(R resource,
A attributes,
DocumentService<A> documentService,
C conversationService,
com.threecrickets.prudence.internal.CachingUtil<R,A> cachingUtil)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
getDuration()
The cache duration.
|
abstract String |
getKey()
Casts the cache key template for the current executable and encoding.
|
String |
getKeyTemplate()
The cache key template.
|
ConcurrentMap<String,String> |
getKeyTemplatePlugins()
The cache key template plugins.
|
boolean |
getOnlyGet()
Whether to cache only GET requests
|
protected String |
getSuffix()
The optional attribute suffix.
|
Set<String> |
getTags() |
void |
setDuration(Object cacheDuration) |
void |
setKeyTemplate(String cacheKeyTemplate) |
void |
setOnlyGet(boolean cacheOnlyGet) |
protected final R extends ServerResource resource
protected final A extends com.threecrickets.prudence.internal.attributes.ResourceContextualAttributes attributes
protected final DocumentService<A extends com.threecrickets.prudence.internal.attributes.ResourceContextualAttributes> documentService
protected final C extends ResourceConversationServiceBase<R> conversationService
protected final com.threecrickets.prudence.internal.CachingUtil<R extends ServerResource,A extends com.threecrickets.prudence.internal.attributes.ResourceContextualAttributes> cachingUtil
public CachingServiceBase(R resource, A attributes, DocumentService<A> documentService, C conversationService, com.threecrickets.prudence.internal.CachingUtil<R,A> cachingUtil)
resource
- The resourceattributes
- The attributesdocumentService
- The document serviceconversationService
- The conversation servicecachingUtil
- The caching utilitiespublic Object getDuration()
setDuration(Object)
public void setDuration(Object cacheDuration)
cacheDuration
- The cache duration in millisecondsgetDuration()
public boolean getOnlyGet()
public void setOnlyGet(boolean cacheOnlyGet)
cacheOnlyGet
- Whether to cache only GET requestsgetOnlyGet()
public String getKeyTemplate()
setKeyTemplate(String)
public void setKeyTemplate(String cacheKeyTemplate)
cacheKeyTemplate
- The cache key templategetKeyTemplate()
public ConcurrentMap<String,String> getKeyTemplatePlugins()
public abstract String getKey()
protected String getSuffix()
Copyright © 2009-2016 Three Crickets LLC.