Class LruCachePolicy

java.lang.Object
org.openspaces.core.space.LruCachePolicy
All Implemented Interfaces:
CachePolicy
Direct Known Subclasses:
CustomCachePolicy

public class LruCachePolicy extends Object implements CachePolicy
Configures the Space to run in LRU mode. Defaults value for all configuration will be based on the schema chosen.
Author:
kimchy
  • Constructor Details

    • LruCachePolicy

      public LruCachePolicy()
  • Method Details

    • size

      public LruCachePolicy size(int size)
      The number of entries to keep in the space. In all bulit in schemas of GigaSpaces, if this is not set, the value is 100000.
    • initialLoadPercentage

      public LruCachePolicy initialLoadPercentage(int initialLoadPercentage)
      When a space is running in a persistent mode (i.e. using the HibernateDataSource implementation), The initial_load sets the % of the space cache data to be loaded (default is 50%) maximum size. To disable this initial load phase, you should configure the initial_load value to be 0.
    • setSize

      public LruCachePolicy setSize(Integer size)
      The number of entries to keep in the space. In all bulit in schemas of GigaSpaces, if this is not set, the value is 100000.
    • setInitialLoadPercentage

      public LruCachePolicy setInitialLoadPercentage(int initialLoadPercentage)
      When a space is running in a persistent mode (i.e. using the HibernateDataSource implementation), The initial_load sets the % of the space cache data to be loaded (default is 50%) maximum size. To disable this initial load phase, you should configure the initial_load value to be 0.
    • toProps

      public Properties toProps()
      Specified by:
      toProps in interface CachePolicy