org.apache.openjpa.datacache
Class CacheDistributionPolicy.Default
java.lang.Object
org.apache.openjpa.datacache.CacheDistributionPolicy.Default
- All Implemented Interfaces:
- CacheDistributionPolicy
- Enclosing interface:
- CacheDistributionPolicy
public static class CacheDistributionPolicy.Default
- extends Object
- implements CacheDistributionPolicy
A default implementation that selects the cache by the type of the given
managed instance.
- See Also:
ClassMetaData.getDataCacheName()
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheDistributionPolicy.Default
public CacheDistributionPolicy.Default()
selectCache
public String selectCache(OpenJPAStateManager sm,
Object context)
- Description copied from interface:
CacheDistributionPolicy
- Selects the name of the cache where the given managed proxy object state be cached.
- Specified by:
selectCache in interface CacheDistributionPolicy
- Parameters:
sm - the managed proxy object to be cachedcontext - the context of invocation. No specific semantics is
attributed currently. Can be null.
- Returns:
- name of the cache or null if the managed instance need not be cached.
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.