Package org.apache.openjpa.conf
Class CacheMarshallerImpl
- java.lang.Object
-
- org.apache.openjpa.conf.CacheMarshallerImpl
-
- All Implemented Interfaces:
CacheMarshaller,Configurable
public class CacheMarshallerImpl extends java.lang.Object implements CacheMarshaller, Configurable
DefaultCacheMarshallerimplementation that writes data to a specified file and reads data from a specified file or URL.- Since:
- 1.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.openjpa.conf.CacheMarshaller
CacheMarshaller.ValidationPolicy
-
-
Constructor Summary
Constructors Constructor Description CacheMarshallerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendConfiguration()Invoked upon completion of bean property configuration for this object.java.lang.StringgetId()The id that this marshaller is responsible for.java.io.FilegetOutputFile()CacheMarshaller.ValidationPolicygetValidationPolicy()java.lang.Objectload()Load and return an instance of the type handled by this marshaller.voidsetConfiguration(Configuration conf)Invoked prior to setting bean properties.voidsetConsumeSerializationErrors(boolean consume)voidsetId(java.lang.String id)The id that this marshaller is responsible for.voidsetInputResource(java.lang.String resource)voidsetInputURL(java.net.URL url)voidsetOutputFile(java.io.File file)voidsetValidationPolicy(java.lang.String policy)TheCacheMarshaller.ValidationPolicythat this marshaller should use.voidstartConfiguration()Invoked before bean property configuration is begun on this object.voidstore(java.lang.Object o)Storeointo the cache.
-
-
-
Method Detail
-
load
public java.lang.Object load()
Description copied from interface:CacheMarshallerLoad and return an instance of the type handled by this marshaller. If the type implementsConfigurable, then this method will invokeConfigurable.setConfiguration(org.apache.openjpa.lib.conf.Configuration),Configurable.startConfiguration(), andConfigurable.endConfiguration()on the instance before returning.- Specified by:
loadin interfaceCacheMarshaller
-
store
public void store(java.lang.Object o)
Description copied from interface:CacheMarshallerStoreointo the cache.- Specified by:
storein interfaceCacheMarshaller
-
setOutputFile
public void setOutputFile(java.io.File file)
-
getOutputFile
public java.io.File getOutputFile()
-
setInputURL
public void setInputURL(java.net.URL url)
-
setInputResource
public void setInputResource(java.lang.String resource)
-
setConsumeSerializationErrors
public void setConsumeSerializationErrors(boolean consume)
-
getId
public java.lang.String getId()
Description copied from interface:CacheMarshallerThe id that this marshaller is responsible for.- Specified by:
getIdin interfaceCacheMarshaller
-
setId
public void setId(java.lang.String id)
Description copied from interface:CacheMarshallerThe id that this marshaller is responsible for. A value for this parameter is required.- Specified by:
setIdin interfaceCacheMarshaller
-
setValidationPolicy
public void setValidationPolicy(java.lang.String policy) throws java.lang.InstantiationException, java.lang.IllegalAccessExceptionDescription copied from interface:CacheMarshallerTheCacheMarshaller.ValidationPolicythat this marshaller should use. A value for this parameter is required. The class will be instantiated via theConfigurationsmechanism, ensuring that if the class implementsConfigurableorGenericConfigurable, it will be taken through the appropriate lifecycle.- Specified by:
setValidationPolicyin interfaceCacheMarshaller- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessException
-
getValidationPolicy
public CacheMarshaller.ValidationPolicy getValidationPolicy()
-
setConfiguration
public void setConfiguration(Configuration conf)
Description copied from interface:ConfigurableInvoked prior to setting bean properties.- Specified by:
setConfigurationin interfaceConfigurable
-
startConfiguration
public void startConfiguration()
Description copied from interface:ConfigurableInvoked before bean property configuration is begun on this object.- Specified by:
startConfigurationin interfaceConfigurable
-
endConfiguration
public void endConfiguration()
Description copied from interface:ConfigurableInvoked upon completion of bean property configuration for this object.- Specified by:
endConfigurationin interfaceConfigurable
-
-