Package org.apache.openjpa.conf
Class OpenJPAVersionAndConfigurationTypeValidationPolicy
- java.lang.Object
-
- org.apache.openjpa.conf.OpenJPAVersionAndConfigurationTypeValidationPolicy
-
- All Implemented Interfaces:
CacheMarshaller.ValidationPolicy,Configurable
public class OpenJPAVersionAndConfigurationTypeValidationPolicy extends Object implements CacheMarshaller.ValidationPolicy, Configurable
Compute validity based on whether or not the cached data is from the same version of Kodo as the current install. This also checks OpenJPA version information in case the OpenJPA jars were independently updated.- Since:
- 1.1.0
-
-
Constructor Summary
Constructors Constructor Description OpenJPAVersionAndConfigurationTypeValidationPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendConfiguration()ObjectgetCacheableData(Object o)Return an object that theCacheMarshallershould store.ObjectgetValidData(Object o)Returns an object that this policy considers to be valid, based ono.voidsetConfiguration(Configuration conf)voidstartConfiguration()
-
-
-
Method Detail
-
getCacheableData
public Object getCacheableData(Object o)
Description copied from interface:CacheMarshaller.ValidationPolicyReturn an object that theCacheMarshallershould store.- Specified by:
getCacheableDatain interfaceCacheMarshaller.ValidationPolicy
-
getValidData
public Object getValidData(Object o)
Description copied from interface:CacheMarshaller.ValidationPolicyReturns an object that this policy considers to be valid, based ono. Ifois not valid, this method will returnnull.- Specified by:
getValidDatain interfaceCacheMarshaller.ValidationPolicy
-
setConfiguration
public void setConfiguration(Configuration conf)
- Specified by:
setConfigurationin interfaceConfigurable
-
startConfiguration
public void startConfiguration()
- Specified by:
startConfigurationin interfaceConfigurable
-
endConfiguration
public void endConfiguration()
- Specified by:
endConfigurationin interfaceConfigurable
-
-