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
DefaultCacheMarshaller
implementation 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 void
endConfiguration()
Invoked upon completion of bean property configuration for this object.java.lang.String
getId()
The id that this marshaller is responsible for.java.io.File
getOutputFile()
CacheMarshaller.ValidationPolicy
getValidationPolicy()
java.lang.Object
load()
Load and return an instance of the type handled by this marshaller.void
setConfiguration(Configuration conf)
Invoked prior to setting bean properties.void
setConsumeSerializationErrors(boolean consume)
void
setId(java.lang.String id)
The id that this marshaller is responsible for.void
setInputResource(java.lang.String resource)
void
setInputURL(java.net.URL url)
void
setOutputFile(java.io.File file)
void
setValidationPolicy(java.lang.String policy)
TheCacheMarshaller.ValidationPolicy
that this marshaller should use.void
startConfiguration()
Invoked before bean property configuration is begun on this object.void
store(java.lang.Object o)
Storeo
into the cache.
-
-
-
Method Detail
-
load
public java.lang.Object load()
Description copied from interface:CacheMarshaller
Load 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:
load
in interfaceCacheMarshaller
-
store
public void store(java.lang.Object o)
Description copied from interface:CacheMarshaller
Storeo
into the cache.- Specified by:
store
in 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:CacheMarshaller
The id that this marshaller is responsible for.- Specified by:
getId
in interfaceCacheMarshaller
-
setId
public void setId(java.lang.String id)
Description copied from interface:CacheMarshaller
The id that this marshaller is responsible for. A value for this parameter is required.- Specified by:
setId
in interfaceCacheMarshaller
-
setValidationPolicy
public void setValidationPolicy(java.lang.String policy) throws java.lang.InstantiationException, java.lang.IllegalAccessException
Description copied from interface:CacheMarshaller
TheCacheMarshaller.ValidationPolicy
that this marshaller should use. A value for this parameter is required. The class will be instantiated via theConfigurations
mechanism, ensuring that if the class implementsConfigurable
orGenericConfigurable
, it will be taken through the appropriate lifecycle.- Specified by:
setValidationPolicy
in interfaceCacheMarshaller
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
-
getValidationPolicy
public CacheMarshaller.ValidationPolicy getValidationPolicy()
-
setConfiguration
public void setConfiguration(Configuration conf)
Description copied from interface:Configurable
Invoked prior to setting bean properties.- Specified by:
setConfiguration
in interfaceConfigurable
-
startConfiguration
public void startConfiguration()
Description copied from interface:Configurable
Invoked before bean property configuration is begun on this object.- Specified by:
startConfiguration
in interfaceConfigurable
-
endConfiguration
public void endConfiguration()
Description copied from interface:Configurable
Invoked upon completion of bean property configuration for this object.- Specified by:
endConfiguration
in interfaceConfigurable
-
-