GigaSpaces XAP 9.7.2 API

org.openspaces.core.space
Class UrlSpaceConfigurer

java.lang.Object
  extended by org.openspaces.core.space.UrlSpaceConfigurer
All Implemented Interfaces:
SpaceConfigurer

public class UrlSpaceConfigurer
extends Object
implements SpaceConfigurer

A simple configurer helper to create IJSpace instances. The configurer wraps UrlSpaceFactoryBean and providing a simpler means to configure it using code.

An example of using it:

 UrlSpaceConfigurer urlSpaceConfigurer = new UrlSpaceConfigurer("/./space").schema("persistent")
          .noWriteLeaseMode(true).lookupGroups(new String[] {"kimchy"});
 ...
 urlSpaceConfigurer.destroy(); // optional
 

Author:
kimchy

Constructor Summary
UrlSpaceConfigurer(String url)
           
 
Method Summary
 UrlSpaceConfigurer addFilterProvider(FilterProviderFactory filterProviderFactory)
           
 UrlSpaceConfigurer addParameter(String name, String value)
           
 UrlSpaceConfigurer addProperties(Properties properties)
           
 UrlSpaceConfigurer addProperty(String name, String value)
           
 UrlSpaceConfigurer addSpaceType(SpaceTypeDescriptor spaceType)
           
 UrlSpaceConfigurer addUrlProperty(String name, String value)
           
 UrlSpaceConfigurer cachePolicy(CachePolicy cachePolicy)
           
 UrlSpaceConfigurer clusterInfo(ClusterInfo clusterInfo)
           
 IJSpace create()
          Creates or finds (if not already created) a new Space by calling AbstractSpaceFactoryBean.afterPropertiesSet().
 UrlSpaceConfigurer credentials(String userName, String password)
          Creates a secured space with the provided user name and password.
 UrlSpaceConfigurer credentialsProvider(CredentialsProvider credentialsProvider)
          Creates a secured space with the provided credentials provider.
 void destroy()
          Destroys the Space by calling AbstractSpaceFactoryBean.destroy().
 UrlSpaceConfigurer externalDataSource(ManagedDataSource externalDataSource)
           
 UrlSpaceConfigurer fifo(boolean fifo)
          Deprecated. Use FifoSupport instead.
 UrlSpaceConfigurer lookupGroups(String... lookupGroups)
           
 UrlSpaceConfigurer lookupGroups(String lookupGroups)
           
 UrlSpaceConfigurer lookupLocators(String... lookupLocators)
           
 UrlSpaceConfigurer lookupLocators(String lookupLocators)
           
 UrlSpaceConfigurer lookupTimeout(int lookupTimeout)
           
 UrlSpaceConfigurer mirror(boolean mirror)
           
 UrlSpaceConfigurer noWriteLease(boolean noWriteLease)
           
 UrlSpaceConfigurer primaryBackupListener(com.gigaspaces.cluster.activeelection.ISpaceModeListener primaryBackupListener)
          Sets a custom primary backup listener
 UrlSpaceConfigurer registerForSpaceModeNotifications(boolean registerForSpaceMode)
           
 UrlSpaceConfigurer replicationFilterProvider(ReplicationFilterProviderFactory replicationFilterProvider)
           
 UrlSpaceConfigurer schema(String schema)
           
 UrlSpaceConfigurer secured(boolean secured)
           
 UrlSpaceConfigurer securityConfig(SecurityConfig securityConfig)
           
 IJSpace space()
          Creates or finds (if not already created) a new Space by calling AbstractSpaceFactoryBean.afterPropertiesSet().
 UrlSpaceConfigurer spaceDataSource(SpaceDataSource spaceDataSource)
           
 UrlSpaceConfigurer spaceSynchronizationEndpoint(SpaceSynchronizationEndpoint synchronizationEndpoint)
           
 UrlSpaceConfigurer userDetails(String userName, String password)
          Deprecated. Use credentials(String, String) instead.
 UrlSpaceConfigurer userDetails(UserDetails userDetails)
          Deprecated. Use credentialsProvider(CredentialsProvider) instead.
 UrlSpaceConfigurer versioned(boolean versioned)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlSpaceConfigurer

public UrlSpaceConfigurer(String url)
Method Detail

addParameter

public UrlSpaceConfigurer addParameter(String name,
                                       String value)
See Also:
UrlSpaceFactoryBean.setParameters(java.util.Map)

addProperty

public UrlSpaceConfigurer addProperty(String name,
                                      String value)
See Also:
UrlSpaceFactoryBean.setProperties(java.util.Properties)

addProperties

public UrlSpaceConfigurer addProperties(Properties properties)
See Also:
UrlSpaceFactoryBean.setProperties(java.util.Properties)

addUrlProperty

public UrlSpaceConfigurer addUrlProperty(String name,
                                         String value)
See Also:
UrlSpaceFactoryBean.setUrlProperties(java.util.Properties)

schema

public UrlSpaceConfigurer schema(String schema)
See Also:
UrlSpaceFactoryBean.setSchema(String)

fifo

@Deprecated
public UrlSpaceConfigurer fifo(boolean fifo)
Deprecated. Use FifoSupport instead.

See Also:
UrlSpaceFactoryBean.setFifo(boolean)

lookupGroups

public UrlSpaceConfigurer lookupGroups(String lookupGroups)
See Also:
UrlSpaceFactoryBean.setLookupGroups(String)

lookupGroups

public UrlSpaceConfigurer lookupGroups(String... lookupGroups)
See Also:
UrlSpaceFactoryBean.setLookupGroups(String)

lookupLocators

public UrlSpaceConfigurer lookupLocators(String lookupLocators)
See Also:
UrlSpaceFactoryBean.setLookupLocators(String)

lookupLocators

public UrlSpaceConfigurer lookupLocators(String... lookupLocators)
See Also:
UrlSpaceFactoryBean.setLookupLocators(String)

lookupTimeout

public UrlSpaceConfigurer lookupTimeout(int lookupTimeout)
See Also:
UrlSpaceFactoryBean.setLookupTimeout(Integer)

versioned

public UrlSpaceConfigurer versioned(boolean versioned)
See Also:
UrlSpaceFactoryBean.setVersioned(boolean)

noWriteLease

public UrlSpaceConfigurer noWriteLease(boolean noWriteLease)
See Also:
UrlSpaceFactoryBean.setNoWriteLease(boolean)

mirror

public UrlSpaceConfigurer mirror(boolean mirror)
See Also:
UrlSpaceFactoryBean.setMirror(boolean)

addFilterProvider

public UrlSpaceConfigurer addFilterProvider(FilterProviderFactory filterProviderFactory)
See Also:
UrlSpaceFactoryBean.setFilterProviders(org.openspaces.core.space.filter.FilterProviderFactory[])

addSpaceType

public UrlSpaceConfigurer addSpaceType(SpaceTypeDescriptor spaceType)
See Also:
UrlSpaceFactoryBean.setSpaceTypes(SpaceTypeDescriptor[])

replicationFilterProvider

public UrlSpaceConfigurer replicationFilterProvider(ReplicationFilterProviderFactory replicationFilterProvider)
See Also:
UrlSpaceFactoryBean.setReplicationFilterProvider(org.openspaces.core.space.filter.replication.ReplicationFilterProviderFactory)

externalDataSource

public UrlSpaceConfigurer externalDataSource(ManagedDataSource externalDataSource)
See Also:
UrlSpaceFactoryBean.setExternalDataSource(com.gigaspaces.datasource.ManagedDataSource)

spaceDataSource

public UrlSpaceConfigurer spaceDataSource(SpaceDataSource spaceDataSource)
See Also:
UrlSpaceFactoryBean.setSpaceDataSource(SpaceDataSource)

spaceSynchronizationEndpoint

public UrlSpaceConfigurer spaceSynchronizationEndpoint(SpaceSynchronizationEndpoint synchronizationEndpoint)

cachePolicy

public UrlSpaceConfigurer cachePolicy(CachePolicy cachePolicy)
See Also:
UrlSpaceFactoryBean.setCachePolicy(CachePolicy)

clusterInfo

public UrlSpaceConfigurer clusterInfo(ClusterInfo clusterInfo)
See Also:
UrlSpaceFactoryBean.setClusterInfo(org.openspaces.core.cluster.ClusterInfo)

registerForSpaceModeNotifications

public UrlSpaceConfigurer registerForSpaceModeNotifications(boolean registerForSpaceMode)
See Also:
AbstractSpaceFactoryBean.setRegisterForSpaceModeNotifications(boolean)

secured

public UrlSpaceConfigurer secured(boolean secured)
See Also:
UrlSpaceFactoryBean.setSecured(boolean)

userDetails

@Deprecated
public UrlSpaceConfigurer userDetails(String userName,
                                                 String password)
Deprecated. Use credentials(String, String) instead.

Creates a secured space with the provided user name and password.


userDetails

@Deprecated
public UrlSpaceConfigurer userDetails(UserDetails userDetails)
Deprecated. Use credentialsProvider(CredentialsProvider) instead.

Creates a secured space with the provided user details.


credentials

public UrlSpaceConfigurer credentials(String userName,
                                      String password)
Creates a secured space with the provided user name and password.


credentialsProvider

public UrlSpaceConfigurer credentialsProvider(CredentialsProvider credentialsProvider)
Creates a secured space with the provided credentials provider.


securityConfig

public UrlSpaceConfigurer securityConfig(SecurityConfig securityConfig)
See Also:
AbstractSpaceFactoryBean.setSecurityConfig(SecurityConfig)

primaryBackupListener

public UrlSpaceConfigurer primaryBackupListener(com.gigaspaces.cluster.activeelection.ISpaceModeListener primaryBackupListener)
Sets a custom primary backup listener


create

public IJSpace create()
Creates or finds (if not already created) a new Space by calling AbstractSpaceFactoryBean.afterPropertiesSet().


space

public IJSpace space()
Creates or finds (if not already created) a new Space by calling AbstractSpaceFactoryBean.afterPropertiesSet().

Specified by:
space in interface SpaceConfigurer
See Also:
create()

destroy

public void destroy()
             throws Exception
Destroys the Space by calling AbstractSpaceFactoryBean.destroy().

Throws:
Exception

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.