Package org.apache.openjpa.conf
Interface CacheMarshaller
- All Known Implementing Classes:
CacheMarshallerImpl
,NoOpCacheMarshaller
public interface CacheMarshaller
Responsible for marshalling and unmarshalling objects between memory and
durable cache.
- Since:
- 1.1.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Validation policies are responsible for computing whether or not a cached data structure is valid for the current context. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
The id that this marshaller is responsible for.load()
Load and return an instance of the type handled by this marshaller.void
The id that this marshaller is responsible for.void
setValidationPolicy
(String policy) TheCacheMarshaller.ValidationPolicy
that this marshaller should use.void
Storeo
into the cache.
-
Method Details
-
load
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
Storeo
into the cache. -
setId
The id that this marshaller is responsible for. A value for this parameter is required. -
getId
String getId()The id that this marshaller is responsible for. -
setValidationPolicy
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.
-