GigaSpaces XAP 7.0 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 addUrlProperty(String name, String value)
           
 UrlSpaceConfigurer cachePolicy(CachePolicy cachePolicy)
           
 UrlSpaceConfigurer clusterInfo(ClusterInfo clusterInfo)
           
 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 userDetails(String userName, String password)
          Creates a secured space with the provided user name and password.
 UrlSpaceConfigurer userDetails(UserDetails userDetails)
          Creates a secured space with the provided user details.
 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[])

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)

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

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


userDetails

public UrlSpaceConfigurer userDetails(UserDetails userDetails)
Creates a secured space with the provided user details.


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


space

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

Specified by:
space in interface SpaceConfigurer

destroy

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

Throws:
Exception

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.