Class GigaMapFactoryBean

java.lang.Object
org.openspaces.core.GigaMapFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class GigaMapFactoryBean extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.BeanNameAware
Author:
kimchy
  • Field Details

    • PREFIX_ISOLATION

      public static final String PREFIX_ISOLATION
      Prefix for the isolation constants defined in TransactionDefinition
      See Also:
  • Constructor Details

    • GigaMapFactoryBean

      public GigaMapFactoryBean()
  • Method Details

    • setMap

      public void setMap(IMap map)

      Sets the map that will be used by the created GigaMap. This is a required parameter to the factory.

      Parameters:
      map - The map used
    • setTxProvider

      public void setTxProvider(TransactionProvider txProvider)

      Sets the transaction provider that will be used by the created GigaMap. This is an optional parameter and defaults to DefaultTransactionProvider.

      Parameters:
      txProvider - The transaction provider to use
    • setExTranslator

      public void setExTranslator(ExceptionTranslator exTranslator)

      Sets the exception translator that will be used by the created GigaMap. This is an optional parameter and defaults to DefaultExceptionTranslator.

      Parameters:
      exTranslator - The exception translator to use
    • setDefaultWaitForResponse

      public void setDefaultWaitForResponse(long defaultWaitForResponse)
      Sets (in milliseconds) the default wait timeout when perfoming Map.get(Object) or Map.remove(Object). Defaults to NO WAIT (0).
    • setDefaultTimeToLive

      public void setDefaultTimeToLive(long defaultTimeToLive)
      Sets the default time to live (in milliseconds) for new entries. Defaults to FOREVER.
    • setDefaultLockTimeToLive

      public void setDefaultLockTimeToLive(long defaultLockTimeToLive)
      Sets (in milliseconds) the default time to live for locks. Defaults to 60 seconds.
    • setDefaultWaitingForLockTimeout

      public void setDefaultWaitingForLockTimeout(long defaultWaitingForLockTimeout)
      Sets (in milliseconds) the default time to wait for a given lock when locking. Defaults to 10 seconds.
    • setDefaultIsolationLevelName

      public final void setDefaultIsolationLevelName(String constantName) throws IllegalArgumentException
      Set the default isolation level by the name of the corresponding constant in TransactionDefinition, e.g. "ISOLATION_DEFAULT".
      Parameters:
      constantName - name of the constant
      Throws:
      IllegalArgumentException - if the supplied value is not resolvable to one of the ISOLATION_ constants or is null
      See Also:
    • setDefaultIsolationLevel

      public void setDefaultIsolationLevel(int defaultIsolationLevel)
      Set the default isolation level. Must be one of the isolation constants in the TransactionDefinition interface. Default is ISOLATION_DEFAULT.
      Throws:
      IllegalArgumentException - if the supplied value is not one of the ISOLATION_ constants
      See Also:
      • TransactionDefinition.ISOLATION_DEFAULT
    • setTransactionManager

      public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

      Set the transaction manager to enable transactional operations. Can be null if transactional support is not required or the default space is used as a transactional context.

    • setBeanName

      public void setBeanName(String beanName)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • afterPropertiesSet

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

      public Object getObject()
      Return GigaMap implementation constructed in the afterPropertiesSet() phase.
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean
    • getObjectType

      public Class<? extends GigaMap> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean
    • isSingleton

      public boolean isSingleton()
      Returns true as this is a singleton.
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception