public class LocalViewSpaceConfigurer extends Object implements SpaceConfigurer
IJSpace
local view. The configurer wraps LocalViewSpaceFactoryBean
and providing a simpler means to configure it using code.
An example of using it:
SpaceConfigurer spaceConfigurer = new SpaceProxyConfigurer("mySpace"); LocalViewSpaceConfigurer localViewConfigurer = new LocalViewSpaceConfigurer(spaceConfigurer) .addViewQuery(new SQLQuery(SimpleMessage.class, "processed = true")); GigaSpace localViewGigaSpace = new GigaSpaceConfigurer(localViewConfigurer).gigaSpace(); ... localViewConfigurer.close(); spaceConfigurer.close();
Constructor and Description |
---|
LocalViewSpaceConfigurer(IJSpace space) |
LocalViewSpaceConfigurer(SpaceConfigurer spaceConfigurer) |
Modifier and Type | Method and Description |
---|---|
LocalViewSpaceConfigurer |
addProperty(String name,
String value) |
LocalViewSpaceConfigurer |
addView(View view)
Deprecated.
since 8.0.5 - use
addViewQuery(SQLQuery) instead. |
LocalViewSpaceConfigurer |
addViewQuery(SQLQuery query)
Adds a query to the view's criteria.
|
LocalViewSpaceConfigurer |
batchSize(int batchSize)
Sets the cache synchronization batch size.
|
LocalViewSpaceConfigurer |
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.
|
LocalViewMonitor |
getLocalViewMonitor()
Returns a
LocalViewMonitor interface from the local view gigaspace |
IJSpace |
localView() |
LocalViewSpaceConfigurer |
maxDisconnectionDuration(long maxDisconnectionDuration)
Sets the maximum time to return cached results before switching to disconnected state.
|
IJSpace |
space() |
public LocalViewSpaceConfigurer(SpaceConfigurer spaceConfigurer)
public LocalViewSpaceConfigurer(IJSpace space)
public LocalViewSpaceConfigurer addProperty(String name, String value)
@Deprecated public LocalViewSpaceConfigurer addView(View view)
addViewQuery(SQLQuery)
instead.public LocalViewSpaceConfigurer addViewQuery(SQLQuery query)
public LocalViewSpaceConfigurer batchSize(int batchSize)
public LocalViewSpaceConfigurer batchTimeout(long batchTimeout)
public LocalViewSpaceConfigurer maxDisconnectionDuration(long maxDisconnectionDuration)
public IJSpace create()
public IJSpace localView()
public LocalViewMonitor getLocalViewMonitor()
LocalViewMonitor
interface from the local view gigaspacepublic void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface SpaceConfigurer
public IJSpace space()
space
in interface SpaceConfigurer
Copyright © GigaSpaces.