GigaSpaces XAP 9.7.2 API

org.openspaces.core.map
Class MapFactoryBean

java.lang.Object
  extended by org.openspaces.core.map.MapFactoryBean
All Implemented Interfaces:
Aware, BeanNameAware, FactoryBean, InitializingBean

public class MapFactoryBean
extends Object
implements InitializingBean, FactoryBean, 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
protected  Log logger
           
 
Constructor Summary
MapFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  IMap createMap()
           
 Object getObject()
           
 Class getObjectType()
           
protected  IJSpace getSpace()
           
 boolean isSingleton()
           
 void setBeanName(String beanName)
          Injected by Spring with the bean name.
 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.
 void setCompression(int compression)
          Sets the compression level.
 void setLocalCacheSupport(LocalCacheSupport localCacheSupport)
          If set, will use local cache with this map.
 void setSpace(IJSpace space)
          Sets the Space the Map will be built on top.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Log logger
Constructor Detail

MapFactoryBean

public MapFactoryBean()
Method Detail

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 BeanNameAware

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

createMap

protected IMap createMap()

getObject

public Object getObject()
Specified by:
getObject in interface FactoryBean

getObjectType

public Class getObjectType()
Specified by:
getObjectType in interface FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.