Spring Data for VMware GemFire
Class InstantiatorFactoryBean
java.lang.Object
org.springframework.data.gemfire.serialization.InstantiatorFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.FactoryBean<Collection<org.apache.geode.Instantiator>>,org.springframework.beans.factory.InitializingBean
public class InstantiatorFactoryBean
extends Object
implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.FactoryBean<Collection<org.apache.geode.Instantiator>>, org.springframework.beans.factory.InitializingBean
FactoryBean that eases registration of custom Instantiator through
InstantiatorGenerators, inside the Spring container.
By default, the returns Instantiators (created through AsmInstantiatorGenerator if a custom
generator is not specified) are registered at startup with GemFire.-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCollection<org.apache.geode.Instantiator>Class<?>booleanvoidsetAutoRegister(boolean autoRegister) Sets the auto-registration of thisInstantiatorduring the container startup.voidsetBeanClassLoader(ClassLoader classLoader) voidsetCustomTypes(Map<Class<? extends org.apache.geode.DataSerializable>, Integer> types) Sets the custom types and associated user ids for generating theInstantiators.voidsetDistribute(boolean distribute) Sets the distribution of the region of thisInstantiatorduring the container startup.voidsetGenerator(InstantiatorGenerator generator) Sets the generator to use for creatingInstantiators.
-
Constructor Details
-
InstantiatorFactoryBean
public InstantiatorFactoryBean()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<Collection<org.apache.geode.Instantiator>>- Throws:
Exception
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<Collection<org.apache.geode.Instantiator>>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<Collection<org.apache.geode.Instantiator>>
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setCustomTypes
Sets the custom types and associated user ids for generating theInstantiators.- Parameters:
types- map containing as keys the custom types and values the associated user ids.
-
setGenerator
Sets the generator to use for creatingInstantiators.- Parameters:
generator- the generator to set
-
setAutoRegister
public void setAutoRegister(boolean autoRegister) Sets the auto-registration of thisInstantiatorduring the container startup. Default is true, meaning the registration will occur once this factory is initialized.- Parameters:
autoRegister- the autoRegister to set- See Also:
-
Instantiator.register(Instantiator)
-
setDistribute
public void setDistribute(boolean distribute) Sets the distribution of the region of thisInstantiatorduring the container startup. Default is false, meaning the registration will not be distributed to other clients.- Parameters:
distribute- whether the registration is distributable or not- See Also:
-
Instantiator.register(Instantiator, boolean)
-