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

public class LocalViewSpaceFactoryBean extends AbstractLocalCacheSpaceFactoryBean
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
  • Constructor Details

    • LocalViewSpaceFactoryBean

      public LocalViewSpaceFactoryBean()
  • Method Details

    • isSingleton

      public boolean isSingleton()
      Returns true since this bean is a singleton.
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean
      Overrides:
      isSingleton in class AbstractLocalCacheSpaceFactoryBean
    • getObject

      public Object getObject()
      Returns an IJSpace that is the local cache wrapping the master proxy set using setSpace(com.j_spaces.core.IJSpace).
    • getObjectType

      public Class<? extends IJSpace> getObjectType()
      Returns the type of the factory object.
    • afterPropertiesSet

      public void afterPropertiesSet()
      Constructs a new local cache IJSpace based on the master local cache set using setSpace(IJSpace) and a set of properties driving the actual local cache type from the configuration. Additional properties are applied based on setProperties(java.util.Properties).
    • destroy

      public void destroy()
      Closes the local cache space
    • getServicesDetails

      public ServiceDetails[] getServicesDetails()
      Description copied from interface: ServiceDetailsProvider
      Retruns one or more service details that the service exposes.
    • setBeanName

      public void setBeanName(String beanName)
      Spring callback that sets the bean name.
    • getBeanName

      protected String getBeanName()
    • setSpace

      public void setSpace(IJSpace space)
      Sets the master space that a local cache will be built on top.
    • setProperties

      public void setProperties(Properties properties)
      Sets additional properties for the local cache.
    • addProperty

      public void addProperty(String name, String value)
    • setBatchSize

      public void setBatchSize(int batchSize)
    • setBatchTimeout

      public void setBatchTimeout(long batchTimeout)
    • setMaxDisconnectionDuration

      public void setMaxDisconnectionDuration(long maxDisconnectionDuration)
    • setLocalViews

      public void setLocalViews(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.
    • addViewQuery

      public void addViewQuery(Object query)
    • setInitialSynchronizationTimeout

      public void setInitialSynchronizationTimeout(long initialSynchronizationTimeout)