|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.space.cache.LocalCacheSpaceConfigurer
public class LocalCacheSpaceConfigurer
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();
Nested Class Summary | |
---|---|
static class |
LocalCacheSpaceConfigurer.UpdateMode
|
Constructor Summary | |
---|---|
LocalCacheSpaceConfigurer(IJSpace space)
|
|
LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer)
|
Method Summary | |
---|---|
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). |
IJSpace |
create()
Creates and returns a local cache according to the configured settings. |
void |
destroy()
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer)
public LocalCacheSpaceConfigurer(IJSpace space)
Method Detail |
---|
public LocalCacheSpaceConfigurer addProperty(String name, String value)
AbstractLocalCacheSpaceFactoryBean.setProperties(java.util.Properties)
public LocalCacheSpaceConfigurer updateMode(LocalCacheSpaceConfigurer.UpdateMode mode)
LocalCacheSpaceFactoryBean.setUpdateModeName(String)
public LocalCacheSpaceConfigurer maxTimeToLive(long maxTimeToLive)
LocalCacheSpaceFactoryBean.setMaxTimeToLive(long)
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 IJSpace space()
space
in interface SpaceConfigurer
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |