public class LocalCacheSpaceConfigurer extends Object implements SpaceConfigurer
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();
Modifier and Type | Class and Description |
---|---|
static class |
LocalCacheSpaceConfigurer.UpdateMode |
Constructor and Description |
---|
LocalCacheSpaceConfigurer(IJSpace space) |
LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer) |
Modifier and Type | Method and Description |
---|---|
LocalCacheSpaceConfigurer |
addProperty(String name,
String value) |
LocalCacheSpaceConfigurer |
batchSize(int batchSize)
Sets the cache synchronization batch size.
|
LocalCacheSpaceConfigurer |
batchTimeout(long batchTimeout)
Sets the cache synchronization batch timeout (i.e. maximum time the server will batch entries before updating the client).
|
void |
close() |
IJSpace |
create()
Creates and returns a local cache according to the configured settings.
|
void |
destroy()
Deprecated.
Sinde 10.0 - use close instead.
|
IJSpace |
localCache() |
LocalCacheSpaceConfigurer |
maxDisconnectionDuration(long maxDisconnectionDuration)
Sets the maximum time to return cached results before switching to disconnected state.
|
LocalCacheSpaceConfigurer |
maxTimeToLive(long maxTimeToLive) |
LocalCacheSpaceConfigurer |
size(int size) |
IJSpace |
space() |
LocalCacheSpaceConfigurer |
updateMode(LocalCacheSpaceConfigurer.UpdateMode mode) |
public LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer)
public LocalCacheSpaceConfigurer(IJSpace space)
public LocalCacheSpaceConfigurer addProperty(String name, String value)
public LocalCacheSpaceConfigurer updateMode(LocalCacheSpaceConfigurer.UpdateMode mode)
public LocalCacheSpaceConfigurer maxTimeToLive(long maxTimeToLive)
public LocalCacheSpaceConfigurer size(int size)
LocalCacheSpaceFactoryBean.setSize(int)
public LocalCacheSpaceConfigurer batchSize(int batchSize)
public LocalCacheSpaceConfigurer batchTimeout(long batchTimeout)
public LocalCacheSpaceConfigurer maxDisconnectionDuration(long maxDisconnectionDuration)
public IJSpace create()
public IJSpace localCache()
public void destroy()
public void close()
close
in interface SpaceConfigurer
public IJSpace space()
space
in interface SpaceConfigurer
Copyright © GigaSpaces.