Class ExoCacheConfig

  • All Implemented Interfaces:
    Cloneable

    public class ExoCacheConfig
    extends Object
    implements Cloneable
    This class defines the main configuration properties of an ExoCache
    Since:
    Feb 20, 2005
    Version:
    $Id: ExoCacheConfig.java 5799 2006-05-28 17:55:42Z geaz $
    Author:
    Tuan Nguyen (tuan08@users.sourceforge.net)
    eXo level API
    Platform
    • Field Detail

      • avoidValueReplication

        @Deprecated
        public boolean avoidValueReplication
        Deprecated.
        Indicates whether or not the replication of the values should be avoided
    • Constructor Detail

      • ExoCacheConfig

        public ExoCacheConfig()
    • Method Detail

      • getName

        public String getName()
        Returns the cache name
        Returns:
        the cache name
      • setName

        public void setName​(String s)
        Sets the cache name
        Parameters:
        s - the cache name
      • getLabel

        public String getLabel()
        Returns the cache label
        Returns:
        the cache label
      • setLabel

        public void setLabel​(String s)
        Sets the cache label
        Parameters:
        s - the cache label
      • getMaxSize

        public int getMaxSize()
        Returns the maximum amount of entries allowed in the cache
        Returns:
        the max size of the cache.
      • setMaxSize

        public void setMaxSize​(int size)
        Sets the maximum amount of entries allowed in the cache
        Parameters:
        size - the max size of the cache
      • getLiveTime

        public long getLiveTime()
        Returns the amount of time (in seconds) a cache entry is not written or read before it is evicted
        Returns:
        the live time
      • setLiveTime

        public void setLiveTime​(long period)
        Sets the amount of time (in seconds) a cache entry is not written or read before it is evicted
        Parameters:
        period - the value of the live time
      • isDistributed

        public boolean isDistributed()
        Indicates if the cache is distributed or not.
        Returns:
        flag that indicates if the cache is distributed or not.
      • setDistributed

        public void setDistributed​(boolean b)
        Sets distributed state
        Parameters:
        b - flag that indicates if the cache is distributed or not.
      • isRepicated

        public boolean isRepicated()
        Indicates if the cache is replicated or not.
        Returns:
        flag that indicates if the cache is repicated or not.
      • setReplicated

        public void setReplicated​(boolean b)
        Sets replicated state
        Parameters:
        b - flag that indicates if the cache is repicated or not.
      • isAsync

        public boolean isAsync()
        Indicates if the cache is async or not.
        Returns:
        flag that indicates if the cache is async or not.
      • isInvalidated

        public boolean isInvalidated()
        Indicates if the cache is invalidate or not.
        Returns:
        flag that indicates if the cache is invalidate or not.
      • getImplementation

        public String getImplementation()
        Returns the full qualified name of the cache implementation to use.
        Returns:
        the full qualified name
      • setImplementation

        public void setImplementation​(String alg)
        Sets the full qualified name of the cache implementation to use.
        Parameters:
        alg - the full qualified name of the cache implementation
      • isLogEnabled

        public boolean isLogEnabled()
      • setLogEnabled

        public void setLogEnabled​(boolean enableLogging)
      • avoidValueReplication

        public boolean avoidValueReplication()
        Returns:
        the avoidValueReplication (synchronised invalidation)
      • setCacheMode

        public void setCacheMode​(CacheMode cacheMode)
      • getCacheMode

        public CacheMode getCacheMode()