org.apache.openjpa.datacache
Class CacheDistributionPolicy.Default

java.lang.Object
  extended by 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()

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.openjpa.datacache.CacheDistributionPolicy
CacheDistributionPolicy.Default
 
Constructor Summary
CacheDistributionPolicy.Default()
           
 
Method Summary
 String selectCache(OpenJPAStateManager sm, Object context)
          Selects the name of the cache where the given managed proxy object state be cached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheDistributionPolicy.Default

public CacheDistributionPolicy.Default()
Method Detail

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 cached
context - 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.