public class MapConfigurer extends Object
IMap
based on an IJSpace
. The configurer
wraps MapFactoryBean
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"}); IJSpace space = urlSpaceConfigurer.space(); IMap map = new MapConfigurer(space).localCachePutFirst(true).createMap(); ... urlSpaceConfigurer.destroySpace(); // optional
Modifier and Type | Class and Description |
---|---|
static class |
MapConfigurer.UpdateMode |
Constructor and Description |
---|
MapConfigurer(IJSpace space) |
Modifier and Type | Method and Description |
---|---|
MapConfigurer |
clustered(boolean clustered) |
MapConfigurer |
compression(int compression) |
IMap |
createMap()
Creates an
IMap based on the configuration. |
MapConfigurer |
localCacheEvictionStrategy(EvictionStrategy evictionStrategy) |
MapConfigurer |
localCachePutFirst(boolean putFirst) |
MapConfigurer |
localCacheSizeLimit(int sizeLimit) |
MapConfigurer |
localCacheUpdateMode(MapConfigurer.UpdateMode updateMode) |
MapConfigurer |
localCacheVersioned(boolean versioned) |
IMap |
map()
Creates an
IMap based on the configuration. |
MapConfigurer |
useLocalCache()
If no local cache properties are set, will mark this map to use local cache.
|
public MapConfigurer(IJSpace space)
public MapConfigurer clustered(boolean clustered)
MapFactoryBean.setClustered(Boolean)
public MapConfigurer compression(int compression)
MapFactoryBean.setCompression(int)
public MapConfigurer useLocalCache()
public MapConfigurer localCacheVersioned(boolean versioned)
public MapConfigurer localCacheEvictionStrategy(EvictionStrategy evictionStrategy)
public MapConfigurer localCacheUpdateMode(MapConfigurer.UpdateMode updateMode)
public MapConfigurer localCachePutFirst(boolean putFirst)
public MapConfigurer localCacheSizeLimit(int sizeLimit)
public IMap createMap()
IMap
based on the configuration. Uses MapFactoryBean.afterPropertiesSet()
.public IMap map()
IMap
based on the configuration. Uses MapFactoryBean.afterPropertiesSet()
.Copyright © GigaSpaces.