Package org.apache.openjpa.conf
Interface CacheMarshaller
-
- All Known Implementing Classes:
CacheMarshallerImpl,NoOpCacheMarshaller
public interface CacheMarshallerResponsible for marshalling and unmarshalling objects between memory and durable cache.- Since:
- 1.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCacheMarshaller.ValidationPolicyValidation policies are responsible for computing whether or not a cached data structure is valid for the current context.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetId()The id that this marshaller is responsible for.java.lang.Objectload()Load and return an instance of the type handled by this marshaller.voidsetId(java.lang.String id)The id that this marshaller is responsible for.voidsetValidationPolicy(java.lang.String policy)TheCacheMarshaller.ValidationPolicythat this marshaller should use.voidstore(java.lang.Object o)Storeointo the cache.
-
-
-
Method Detail
-
load
java.lang.Object load()
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.
-
store
void store(java.lang.Object o)
Storeointo the cache.
-
setId
void setId(java.lang.String id)
The id that this marshaller is responsible for. A value for this parameter is required.
-
getId
java.lang.String getId()
The id that this marshaller is responsible for.
-
setValidationPolicy
void setValidationPolicy(java.lang.String policy) throws java.lang.InstantiationException, java.lang.IllegalAccessExceptionTheCacheMarshaller.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.- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessException
-
-