GigaSpaces XAP 7.0 API

org.openspaces.core.space.cache
Class LocalCacheSpaceConfigurer

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

public class LocalCacheSpaceConfigurer
extends Object
implements SpaceConfigurer

A simple configurer helper to create IJSpace local cache. The configurer wraps LocalCacheSpaceFactoryBean and providing a simpler means to configure it using code.

An example of using it:

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

 LocalCacheSpaceConfigurer localCacheConfigurer = new LocalCacheSpaceConfigurer(urlSpaceConfigurer).updateMode(UpdateMode.PULL);
 GigaSpace localCacheGigaSpace = new GigaSpaceConfigurer(localCacheConfigurer).gigaSpace();
 ...
 localCacheConfigurer.destroy();
 urlSpaceConfigurer.destroy();
 

Author:
kimchy

Nested Class Summary
static class LocalCacheSpaceConfigurer.UpdateMode
           
 
Constructor Summary
LocalCacheSpaceConfigurer(IJSpace space)
           
LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer)
           
 
Method Summary
 LocalCacheSpaceConfigurer addProperty(String name, String value)
           
 void destroy()
           
 IJSpace localCache()
           
 LocalCacheSpaceConfigurer size(int size)
           
 IJSpace space()
           
 LocalCacheSpaceConfigurer updateMode(LocalCacheSpaceConfigurer.UpdateMode mode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalCacheSpaceConfigurer

public LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer)

LocalCacheSpaceConfigurer

public LocalCacheSpaceConfigurer(IJSpace space)
Method Detail

addProperty

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

updateMode

public LocalCacheSpaceConfigurer updateMode(LocalCacheSpaceConfigurer.UpdateMode mode)
See Also:
LocalCacheSpaceFactoryBean.setUpdateModeName(String)

size

public LocalCacheSpaceConfigurer size(int size)
See Also:
LocalCacheSpaceFactoryBean.setSize(int)

localCache

public IJSpace localCache()

destroy

public void destroy()

space

public IJSpace space()
Specified by:
space in interface SpaceConfigurer

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.