org.openspaces.core.space.cache
Class LocalCacheSpaceConfigurer
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalCacheSpaceConfigurer
public LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer)
LocalCacheSpaceConfigurer
public LocalCacheSpaceConfigurer(IJSpace space)
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
Copyright © GigaSpaces.