public interface CacheDistributionPolicy extends Configurable
@Cacheable
annotation or OpenJPA specific
@DataCache
annotation or configuration property
such as javax.persistence.sharedCache.mode
determined the type of the instance being cachable.
javax.persistence.sharedCache.mode
is set to NONE
.
<property name="openjpa.CacheDistributionPolicy" value="com.acme.FooPolicy(param1='xyz',param2=true)"/>where
com.acme.FooPolicy
is an implementation of this interface and defines bean style setter and
getter methods for String property param1
and boolean property param2
.Modifier and Type | Method and Description |
---|---|
String |
selectCache(OpenJPAStateManager sm,
Object context)
Selects the name of the cache where the given managed proxy object state be cached.
|
endConfiguration, setConfiguration, startConfiguration
String selectCache(OpenJPAStateManager sm, Object context)
sm
- the managed proxy object to be cached. The actual managed instance can be accessed from the proxy
instance simply as sm.getManagedInstance()
.context
- the context of invocation. No specific semantics is attributed currently. Can be null.Copyright © 2006–2017 Apache Software Foundation. All rights reserved.