public class MappingPdxSerializer extends Object implements com.gemstone.gemfire.pdx.PdxSerializer, ApplicationContextAware
PdxSerializer
implementation that uses a
GemfireMappingContext
to read and write entities.Constructor and Description |
---|
MappingPdxSerializer()
Creates a new
MappingPdxSerializer using the default
GemfireMappingContext and DefaultConversionService . |
MappingPdxSerializer(GemfireMappingContext mappingContext,
ConversionService conversionService)
|
Modifier and Type | Method and Description |
---|---|
Object |
fromData(Class<?> type,
com.gemstone.gemfire.pdx.PdxReader reader) |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setCustomSerializers(Map<Class<?>,com.gemstone.gemfire.pdx.PdxSerializer> customSerializers)
Configures custom PDX serializers to use for specific class types.
|
void |
setGemfireInstantiators(Map<Class<?>,org.springframework.data.convert.EntityInstantiator> gemfireInstantiators)
Configures the
EntityInstantiator s to be used to create the
instances to be read. |
boolean |
toData(Object value,
com.gemstone.gemfire.pdx.PdxWriter writer) |
public MappingPdxSerializer(GemfireMappingContext mappingContext, ConversionService conversionService)
mappingContext
- must not be null.conversionService
- must not be null.public MappingPdxSerializer()
MappingPdxSerializer
using the default
GemfireMappingContext
and DefaultConversionService
.public void setGemfireInstantiators(Map<Class<?>,org.springframework.data.convert.EntityInstantiator> gemfireInstantiators)
EntityInstantiator
s to be used to create the
instances to be read.gemfireInstantiators
- must not be null.public void setCustomSerializers(Map<Class<?>,com.gemstone.gemfire.pdx.PdxSerializer> customSerializers)
customSerializers
- a mapping of domain object class types and their corresponding PDX serializer.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public Object fromData(Class<?> type, com.gemstone.gemfire.pdx.PdxReader reader)
fromData
in interface com.gemstone.gemfire.pdx.PdxSerializer
public boolean toData(Object value, com.gemstone.gemfire.pdx.PdxWriter writer)
toData
in interface com.gemstone.gemfire.pdx.PdxSerializer