Package org.openspaces.core.space.cache
Class LocalViewSpaceFactoryBean
java.lang.Object
org.openspaces.core.space.cache.AbstractLocalCacheSpaceFactoryBean
org.openspaces.core.space.cache.LocalViewSpaceFactoryBean
- All Implemented Interfaces:
ServiceDetailsProvider,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean,org.springframework.beans.factory.InitializingBean
The space local view proxy maintains a subset of the master space's data, allowing the client to
read distributed data without any remote operations.
Data is streamed into the client view in an implicit manner - as opposed to local cache data
(LocalCacheSpaceFactoryBean), that is loaded into the client on- demand, and later
updated or evicted.
The local view is defined via a filter (setLocalViews(java.util.List) localViews) -
as opposed to the local cache that caches data at the client side only after the data has been
read
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) voidaddViewQuery(Object query) voidConstructs a new local cacheIJSpacebased on the master local cache set usingsetSpace(IJSpace)and a set of properties driving the actual local cache type from the configuration.voiddestroy()Closes the local cache spaceprotected StringReturns anIJSpacethat is the local cache wrapping the master proxy set usingsetSpace(com.j_spaces.core.IJSpace).Returns the type of the factory object.Retruns one or more service details that the service exposes.booleanReturnstruesince this bean is a singleton.voidsetBatchSize(int batchSize) voidsetBatchTimeout(long batchTimeout) voidsetBeanName(String beanName) Spring callback that sets the bean name.voidsetInitialSynchronizationTimeout(long initialSynchronizationTimeout) voidsetLocalViews(List<Object> queries) Sets an array of filters/views that define what portion of the data from the master space will be streamed to this local view.voidsetMaxDisconnectionDuration(long maxDisconnectionDuration) voidsetProperties(Properties properties) Sets additional properties for the local cache.voidSets the master space that a local cache will be built on top.
-
Constructor Details
-
LocalViewSpaceFactoryBean
public LocalViewSpaceFactoryBean()
-
-
Method Details
-
isSingleton
public boolean isSingleton()Returnstruesince this bean is a singleton.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean- Overrides:
isSingletonin classAbstractLocalCacheSpaceFactoryBean
-
getObject
Returns anIJSpacethat is the local cache wrapping the master proxy set usingsetSpace(com.j_spaces.core.IJSpace). -
getObjectType
Returns the type of the factory object. -
afterPropertiesSet
public void afterPropertiesSet()Constructs a new local cacheIJSpacebased on the master local cache set usingsetSpace(IJSpace)and a set of properties driving the actual local cache type from the configuration. Additional properties are applied based onsetProperties(java.util.Properties). -
destroy
public void destroy()Closes the local cache space -
getServicesDetails
Description copied from interface:ServiceDetailsProviderRetruns one or more service details that the service exposes. -
setBeanName
Spring callback that sets the bean name. -
getBeanName
-
setSpace
Sets the master space that a local cache will be built on top. -
setProperties
Sets additional properties for the local cache. -
addProperty
-
setBatchSize
public void setBatchSize(int batchSize) -
setBatchTimeout
public void setBatchTimeout(long batchTimeout) -
setMaxDisconnectionDuration
public void setMaxDisconnectionDuration(long maxDisconnectionDuration) -
setLocalViews
Sets an array of filters/views that define what portion of the data from the master space will be streamed to this local view. -
addViewQuery
-
setInitialSynchronizationTimeout
public void setInitialSynchronizationTimeout(long initialSynchronizationTimeout)
-