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:
UrlSpaceConfigurer urlSpaceConfigurer = new UrlSpaceConfigurer("/./space").schema("persistent") .noWriteLeaseMode(true).lookupGroups(new String[] {"kimchy"}); LocalViewSpaceConfigurer localViewConfigurer = new LocalViewSpaceConfigurer(urlSpaceConfigurer) .addView(new View(SimpleMessage.class, "processed = true")); GigaSpace localViewGigaSpace = new GigaSpaceConfigurer(localViewConfigurer).gigaSpace(); ... localViewConfigurer.destroy(); urlSpaceConfigurer.destroy(); // optional
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.
|
void |
destroy()
Deprecated.
Sinde 10.0 - use close instead.
|
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 void destroy()
public void close()
close
in interface SpaceConfigurer
public IJSpace space()
space
in interface SpaceConfigurer
Copyright © GigaSpaces.