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:
SpaceConfigurer spaceConfigurer = new SpaceProxyConfigurer("mySpace"); SpaceConfigurer localCacheConfigurer = new LocalCacheSpaceConfigurer(spaceConfigurer); GigaSpace localCacheGigaSpace = new GigaSpaceConfigurer(localCacheConfigurer).gigaSpace(); ... localCacheConfigurer.close(); spaceConfigurer.close();
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.
|
void |
close() |
IJSpace |
create()
Creates and returns a local cache according to the configured settings.
|
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 close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface SpaceConfigurer
public IJSpace space()
space
in interface SpaceConfigurer
Copyright © GigaSpaces.