public class UrlSpaceFactoryBean extends AbstractSpaceFactoryBean implements BeanLevelMergedPropertiesAware, ClusterInfoAware
IJSpace
) based on a url.
The factory allows to specify url properties using urlProperties
and space parameters using parameters
or
using properties
. It also accepts a ClusterInfo
using
setClusterInfo(ClusterInfo)
and translates it into the relevant space url properties
automatically.
Most url properties are explicitly exposed using different setters. Though they can also be
set using the urlProperties
the explicit setters
allow for more readable and simpler configuration. Some examples of explicit url properties are:
setSchema(String)
, setFifo(boolean)
.
The factory uses the BeanLevelMergedPropertiesAware
in order to be injected with
properties that were not parameterized in advance (using ${...} notation). This will directly
inject additional properties in the Space creation/finding process.
logger
Constructor and Description |
---|
UrlSpaceFactoryBean()
Creates a new url space factory bean.
|
UrlSpaceFactoryBean(String url)
Creates a new url space factory bean based on the url provided.
|
UrlSpaceFactoryBean(String url,
Map<String,Object> params)
Creates a new url space factory bean based on the url and map parameters provided.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeStore(AttributeStore attributeStore) |
protected IJSpace |
doCreateSpace()
Creates the space.
|
void |
setAttributeStore(AttributeStoreFactoryBean attributeStore) |
void |
setBlobStoreDataPolicy(BlobStoreDataPolicyFactoryBean blobStoreDataPolicy) |
void |
setCachePolicy(CachePolicy cachePolicy)
Sets the cache policy that the space will use.
|
void |
setClusterInfo(ClusterInfo clusterInfo)
Injected thanks to this bean implementing
ClusterInfoAware . |
void |
setCustomCachePolicy(CustomCachePolicyFactoryBean customCachePolicy) |
void |
setCustomComponent(SpaceCustomComponentFactoryBean customComponentFactoryBean) |
void |
setDistributedTransactionProcessingConfiguration(DistributedTransactionProcessingConfigurationFactoryBean distributedTransactionProcessingConfiguration)
Sets the distributed transaction processing configuration for the Mirror component.
|
void |
setExternalDataSource(ManagedDataSource externalDataSource)
A data source
|
void |
setFifo(boolean fifo)
Indicates that all take/write operations be conducted in FIFO mode.
|
void |
setFilterProviders(FilterProviderFactory[] filterProviders)
Inject a list of filter provider factories providing the ability to inject actual Space
filters.
|
void |
setGatewayTargets(SpaceCustomComponentFactoryBean gatewayFactoryBean)
Deprecated.
Since 12.0 - Use #setCustomComponent instead.
|
void |
setLookupGroups(String lookupGroups)
The Jini Lookup Service group to find container or space using multicast (jini protocol).
|
void |
setLookupLocators(String lookupLocators)
The Jini Lookup locators for the Space.
|
void |
setLookupTimeout(Integer lookupTimeout)
The max timeout in milliseconds to find a Container or Space using multicast (jini
protocol).
|
void |
setMergedBeanLevelProperties(Properties beanLevelProperties)
Externally managed override properties using open spaces extended config support.
|
void |
setMirror(boolean mirror)
When setting this URL property to
true it will allow the space to connect to the
Mirror service to push its data and operations for asynchronous persistency. |
void |
setNoWriteLease(boolean noWriteLease)
If
true - Lease object would not return from the write/writeMultiple operations. |
void |
setParameters(Map<String,Object> parameters)
Sets the parameters the
IJSpace will be created with. |
void |
setProperties(Properties properties)
Same as
parameters just with properties for simpler
configuration. |
void |
setQueryExtensionProviders(QueryExtensionProvider[] queryExtenstionProviders)
Inject a list of space types.
|
void |
setReplicationFilterProvider(ReplicationFilterProviderFactory replicationFilterProvider)
Injects a replication provider allowing to directly inject actual replication filters.
|
void |
setSchema(String schema)
The space instance is created using a space schema file which can be used as a template
configuration file for creating a space.
|
void |
setSecured(boolean secured)
Sets the space as secured.
|
void |
setSecurityConfig(SecurityConfig securityConfig)
Sets security configuration for the Space.
|
void |
setSpaceDataSource(SpaceDataSource spaceDataSource)
Sets the
SpaceDataSource which will be used as a data source for the space. |
void |
setSpaceSqlFunction(SpaceSqlFunctionBean[] spaceSqlFunctionBeans) |
void |
setSpaceSynchronizationEndpoint(SpaceSynchronizationEndpoint spaceSynchronizationEndpoint) |
void |
setSpaceTypes(SpaceTypeDescriptor[] typeDescriptors)
Inject a list of space types.
|
void |
setUrl(String url)
Sets the url the
IJSpace will be created with. |
void |
setUrlProperties(Properties urlProperties)
Sets the url properties.
|
void |
setVersioned(boolean versioned)
When
false , optimistic lock is disabled. |
addServiceDetails, afterPropertiesSet, close, destroy, fireSpaceAfterBackupEvent, fireSpaceAfterPrimaryEvent, fireSpaceBeforeBackupEvent, fireSpaceBeforePrimaryEvent, getApplicationContext, getName, getObject, getObjectType, getSecurityConfig, getServicesDetails, isAlive, isMemberAliveEnabled, isRegisterForSpaceModeNotifications, isSingleton, onApplicationEvent, process, setApplicationContext, setBeanName, setCredentialsProvider, setEnableMemberAliveIndicator, setPrimaryBackupListener, setRegisterForSpaceModeNotifications, setUserDetails, toString
public UrlSpaceFactoryBean()
setUrl(String)
must be called before the bean is initialized.public UrlSpaceFactoryBean(String url)
url
- The url to create the IJSpace
with.protected IJSpace doCreateSpace() throws org.springframework.dao.DataAccessException
doCreateSpace
in class AbstractSpaceFactoryBean
org.springframework.dao.DataAccessException
public void setSecured(boolean secured)
public void setSecurityConfig(SecurityConfig securityConfig)
AbstractSpaceFactoryBean
setSecurityConfig
in class AbstractSpaceFactoryBean
public void setUrl(String url)
IJSpace
will be created with. Note this url does not take affect
after the bean has been initialized.url
- The url to create the IJSpace
with.public void setParameters(Map<String,Object> parameters)
IJSpace
will be created with. Note this parameters does not
take affect after the bean has been initialized.
Note, this should not be confused with setUrlProperties(java.util.Properties)
.
The parameters here are the ones referred to as custom properties and allows for example to
control the xpath injection to space schema.
parameters
- The parameters to create the IJSpace
with.public void setProperties(Properties properties)
parameters
just with properties for simpler
configuration.public void setUrlProperties(Properties urlProperties)
public void setSchema(String schema)
If a schema name is not defined, a default schema name called default
will be
used.
public void setFifo(boolean fifo)
false
).public void setLookupGroups(String lookupGroups)
public void setLookupLocators(String lookupLocators)
host1:port1,host2:port2
.public void setLookupTimeout(Integer lookupTimeout)
6000
(i.e. 6 seconds).public void setVersioned(boolean versioned)
false
, optimistic lock is disabled. Default to the Space default value.public void setNoWriteLease(boolean noWriteLease)
true
- Lease object would not return from the write/writeMultiple operations.
Defaults to the Space default value (false
).public void setMirror(boolean mirror)
true
it will allow the space to connect to the
Mirror service to push its data and operations for asynchronous persistency. Defaults to the
Space default (which defaults to false
).public void setFilterProviders(FilterProviderFactory[] filterProviders)
public void setReplicationFilterProvider(ReplicationFilterProviderFactory replicationFilterProvider)
public void setExternalDataSource(ManagedDataSource externalDataSource)
public void setSpaceDataSource(SpaceDataSource spaceDataSource)
SpaceDataSource
which will be used as a data source for the space.spaceDataSource
- The SpaceDataSource
instance.public void setSpaceSynchronizationEndpoint(SpaceSynchronizationEndpoint spaceSynchronizationEndpoint)
spaceSynchronizationEndpoint
- public void setSpaceTypes(SpaceTypeDescriptor[] typeDescriptors)
public void setQueryExtensionProviders(QueryExtensionProvider[] queryExtenstionProviders)
public void setCachePolicy(CachePolicy cachePolicy)
public void setMergedBeanLevelProperties(Properties beanLevelProperties)
setMergedBeanLevelProperties
in interface BeanLevelMergedPropertiesAware
public void attributeStore(AttributeStore attributeStore)
public void setClusterInfo(ClusterInfo clusterInfo)
ClusterInfoAware
. If set will use the
cluster information in order to configure the url based on it.setClusterInfo
in interface ClusterInfoAware
clusterInfo
- The cluster information to be injected@Deprecated public void setGatewayTargets(SpaceCustomComponentFactoryBean gatewayFactoryBean)
gatewayFactoryBean
- The gateway targets factory bean.public void setCustomComponent(SpaceCustomComponentFactoryBean customComponentFactoryBean)
public void setDistributedTransactionProcessingConfiguration(DistributedTransactionProcessingConfigurationFactoryBean distributedTransactionProcessingConfiguration)
distributedTransactionProcessingConfiguration
- The distributed transaction processing
configuration to set.public void setCustomCachePolicy(CustomCachePolicyFactoryBean customCachePolicy)
public void setBlobStoreDataPolicy(BlobStoreDataPolicyFactoryBean blobStoreDataPolicy)
public void setAttributeStore(AttributeStoreFactoryBean attributeStore)
public void setSpaceSqlFunction(SpaceSqlFunctionBean[] spaceSqlFunctionBeans)
Copyright © GigaSpaces.