From 92f162bd4b12b0700f9784df26cfb21982a44c91 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Wed, 10 Feb 2010 02:32:41 +0000 Subject: [PATCH] OPENJPA-1334: Separate distribution policy from DataCacheManager. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@908325 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/conf/OpenJPAConfiguration.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java b/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java index 523524eda..b5af37e7c 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java @@ -21,6 +21,7 @@ package org.apache.openjpa.conf; import java.util.Collection; import java.util.Map; +import org.apache.openjpa.datacache.CacheDistributionPolicy; import org.apache.openjpa.datacache.DataCache; import org.apache.openjpa.datacache.DataCacheManager; import org.apache.openjpa.datacache.DataCacheMode; @@ -1799,5 +1800,42 @@ public interface OpenJPAConfiguration * @since 2.0.0 */ public String getDataCacheMode(); + + /** + * Gets the policy object that determines distribution of cached instances + * across named partitions of L2 data cache. + * + * @return an implementation of {@link CacheDistributionPolicy}. + * @since 2.0.0 + */ + public CacheDistributionPolicy getCacheDistributionPolicyInstance(); + + /** + * Sets the policy object that determines distribution of cached instances + * across named partitions of L2 data cache. + * + * @param policy a non-null implementation of {@link CacheDistributionPolicy}. + * @since 2.0.0 + */ + public void setCacheDistributionPolicyInstance(CacheDistributionPolicy policy); + + /** + * Gets the plug-in string that described the policy to distribute cached instances + * across named partitions of L2 data cache. + * + * @return a plug-in string for {@link CacheDistributionPolicy}. + * @since 2.0.0 + */ + public String getCacheDistributionPolicy(); + + /** + * Sets the plug-in string that describes the policy to distribute cached instances + * across named partitions of L2 data cache. + * + * @param a plug-in string for {@link CacheDistributionPolicy}. + * @since 2.0.0 + */ + public void setCacheDistributionPolicy(String policyPlugin); + }