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 Details

    • logger

      protected org.apache.commons.logging.Log logger
  • Constructor Details

    • MapFactoryBean

      public MapFactoryBean()
  • Method Details

    • setSpace

      public void setSpace(IJSpace space)
      Sets the Space the Map will be built on top.
    • getSpace

      protected IJSpace getSpace()
    • setClustered

      public void setClustered(Boolean clustered)

      Sets the cluster flag controlling if this IMap will 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 to true if the space is an embedded one AND the space is not a local cache proxy. It will be set to false otherwise (i.e. the space is not an embedded space OR the space is a local cache proxy).

      Parameters:
      clustered - If the IMap is 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 to 0.
    • setLocalCacheSupport

      public void setLocalCacheSupport(LocalCacheSupport localCacheSupport)
      If set, will use local cache with this map. The settings hold different aspects of configuration for the local cache.
    • setBeanName

      public void setBeanName(String beanName)
      Injected by Spring with the bean name.
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • createMap

      protected IMap createMap()
    • getObject

      public Object getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean
    • getObjectType

      public Class getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean