Package org.openspaces.core.space.cache
Class LocalCacheSpaceConfigurer
java.lang.Object
org.openspaces.core.space.cache.LocalCacheSpaceConfigurer
- All Implemented Interfaces:
Closeable,AutoCloseable,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:
SpaceConfigurer spaceConfigurer = new SpaceProxyConfigurer("mySpace");
SpaceConfigurer localCacheConfigurer = new LocalCacheSpaceConfigurer(spaceConfigurer);
GigaSpace localCacheGigaSpace = new GigaSpaceConfigurer(localCacheConfigurer).gigaSpace();
...
localCacheConfigurer.close();
spaceConfigurer.close();
- Author:
- kimchy
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLocalCacheSpaceConfigurer(IJSpace space) LocalCacheSpaceConfigurer(SpaceConfigurer spaceConfigurer) -
Method Summary
Modifier and TypeMethodDescriptionaddProperty(String name, String value) batchSize(int batchSize) Sets the cache synchronization batch size.batchTimeout(long batchTimeout) Sets the cache synchronization batch timeout (i.e.voidclose()create()Creates and returns a local cache according to the configured settings.maxDisconnectionDuration(long maxDisconnectionDuration) Sets the maximum time to return cached results before switching to disconnected state.maxTimeToLive(long maxTimeToLive) size(int size) space()
-
Constructor Details
-
LocalCacheSpaceConfigurer
-
LocalCacheSpaceConfigurer
-
-
Method Details
-
addProperty
-
updateMode
-
maxTimeToLive
-
size
- See Also:
-
batchSize
Sets the cache synchronization batch size.- Since:
- 8.0.5
-
batchTimeout
Sets the cache synchronization batch timeout (i.e. maximum time the server will batch entries before updating the client).- Since:
- 8.0.5
-
maxDisconnectionDuration
Sets the maximum time to return cached results before switching to disconnected state.- Since:
- 8.0.5
-
create
Creates and returns a local cache according to the configured settings.- Returns:
- A configured space.
- Since:
- 8.0
-
localCache
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSpaceConfigurer
-
space
- Specified by:
spacein interfaceSpaceConfigurer
-