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
Modifier and Type | Field and Description |
---|---|
static String |
PREFIX_ISOLATION
Prefix for the isolation constants defined in TransactionDefinition
|
Constructor and Description |
---|
GigaMapFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
Object |
getObject()
Return
GigaMap implementation constructed in the afterPropertiesSet()
phase. |
Class<? extends GigaMap> |
getObjectType() |
boolean |
isSingleton()
Returns
true as this is a singleton. |
void |
setBeanName(String beanName) |
void |
setDefaultIsolationLevel(int defaultIsolationLevel)
Set the default isolation level.
|
void |
setDefaultIsolationLevelName(String constantName)
Set the default isolation level by the name of the corresponding constant in
TransactionDefinition, e.g.
|
void |
setDefaultLockTimeToLive(long defaultLockTimeToLive)
Sets (in milliseconds) the default time to live for locks.
|
void |
setDefaultTimeToLive(long defaultTimeToLive)
Sets the default time to live (in milliseconds) for new entries.
|
void |
setDefaultWaitForResponse(long defaultWaitForResponse)
Sets (in milliseconds) the default wait timeout when perfoming
Map.get(Object) or
Map.remove(Object) . |
void |
setDefaultWaitingForLockTimeout(long defaultWaitingForLockTimeout)
Sets (in milliseconds) the default time to wait for a given lock when locking.
|
void |
setExTranslator(ExceptionTranslator exTranslator)
Sets the exception translator that will be used by the created
GigaMap . |
void |
setMap(IMap map)
Sets the map that will be used by the created
GigaMap . |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Set the transaction manager to enable transactional operations.
|
void |
setTxProvider(TransactionProvider txProvider)
Sets the transaction provider that will be used by the created
GigaMap . |
public static final String PREFIX_ISOLATION
public void setMap(IMap map)
Sets the map that will be used by the created GigaMap
. This is a required
parameter to the factory.
map
- The map usedpublic 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
.
txProvider
- The transaction provider to usepublic 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
.
exTranslator
- The exception translator to usepublic void setDefaultWaitForResponse(long defaultWaitForResponse)
Map.get(Object)
or
Map.remove(Object)
. Defaults to NO WAIT (0).public void setDefaultTimeToLive(long defaultTimeToLive)
public void setDefaultLockTimeToLive(long defaultLockTimeToLive)
public void setDefaultWaitingForLockTimeout(long defaultWaitingForLockTimeout)
public final void setDefaultIsolationLevelName(String constantName) throws IllegalArgumentException
constantName
- name of the constantIllegalArgumentException
- if the supplied value is not resolvable to one of the
ISOLATION_
constants or is null
setDefaultIsolationLevel(int)
,
TransactionDefinition.ISOLATION_DEFAULT
public void setDefaultIsolationLevel(int defaultIsolationLevel)
IllegalArgumentException
- if the supplied value is not one of the ISOLATION_
constantsTransactionDefinition.ISOLATION_DEFAULT
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.
public void setBeanName(String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public Object getObject()
GigaMap
implementation constructed in the afterPropertiesSet()
phase.getObject
in interface org.springframework.beans.factory.FactoryBean
public Class<? extends GigaMap> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
true
as this is a singleton.isSingleton
in interface org.springframework.beans.factory.FactoryBean
Copyright © GigaSpaces.