Package org.openspaces.core.map
Class MapFactoryBean
java.lang.Object
org.openspaces.core.map.MapFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.FactoryBean,org.springframework.beans.factory.InitializingBean
public class MapFactoryBean
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.BeanNameAware
Base class for different
IMap factories. Uses the referenced space
(using setSpace(com.j_spaces.core.IJSpace)) in order to build the map interface around
it.
Supports the cluster flag controlling if the map will work with a clustered view of the space
or directly with a cluster member. By default it will work directly with a cluster member if the
space was loaded in embedded mode (as if clustered flag was set to true), otherwise
it will work with a clustered view.
- Author:
- kimchy
-
Field Summary
FieldsFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected IMapprotected IJSpacegetSpace()booleanvoidsetBeanName(String beanName) Injected by Spring with the bean name.voidsetClustered(Boolean clustered) Sets the cluster flag controlling if thisIMapwill work with a clustered view of the space or directly with a cluster member.voidsetCompression(int compression) Sets the compression level.voidsetLocalCacheSupport(LocalCacheSupport localCacheSupport) If set, will use local cache with this map.voidSets the Space the Map will be built on top.
-
Field Details
-
logger
protected org.apache.commons.logging.Log logger
-
-
Constructor Details
-
MapFactoryBean
public MapFactoryBean()
-
-
Method Details
-
setSpace
Sets the Space the Map will be built on top. -
getSpace
-
setClustered
Sets the cluster flag controlling if this
IMapwill work with a clustered view of the space or directly with a cluster member. By default if this flag is not set it will be set automatically by this factory. It will be set totrueif the space is an embedded one AND the space is not a local cache proxy. It will be set tofalseotherwise (i.e. the space is not an embedded space OR the space is a local cache proxy).- Parameters:
clustered- If theIMapis going to work with a clustered view of the space or directly with a cluster member
-
setCompression
public void setCompression(int compression) Sets the compression level. Defaults to0. -
setLocalCacheSupport
If set, will use local cache with this map. The settings hold different aspects of configuration for the local cache. -
setBeanName
Injected by Spring with the bean name.- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
createMap
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean
-