Class SCCacheConfiguration

java.lang.Object
org.serviceconnector.conf.SCCacheConfiguration

public class SCCacheConfiguration extends Object
The Class SCCacheConfiguration. This is the main SC cache configuration class, keeping all required configuration parameters. This class is used to setup SC cache SCCache instance.
  • Constructor Details

    • SCCacheConfiguration

      public SCCacheConfiguration()
      Instantiates a new cache configuration.
  • Method Details

    • load

      public void load(org.apache.commons.configuration2.CompositeConfiguration compositeConfiguration) throws SCMPValidatorException
      Loads cache parameters from properties file.
      Service Connector cache parameters:
      cache.enabled=true
      cache.diskPath=../../dev/cache
      cache.maxElementsInMemory=100000
      cache.maxElementsOnDisk=1000000
      cache.expirationCheckIntervalSeconds=60
      Parameters:
      compositeConfiguration - the composite configuration
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • isCacheEnabled

      public boolean isCacheEnabled()
      Checks if is cache enabled.
      Returns:
      true, if is cache enabled
    • getDiskPath

      public String getDiskPath()
      Gets the disk path.
      Returns:
      the disk path
    • getMaxElementsInMemory

      public int getMaxElementsInMemory()
      Gets the max elements in memory.
      Returns:
      the max elements in memory
    • getMaxElementsOnDisk

      public int getMaxElementsOnDisk()
      Gets the max elements on disk.
      Returns:
      the max elements on disk
    • getExpirationCheckIntervalSeconds

      public int getExpirationCheckIntervalSeconds()
      Gets the expiration check interval seconds.
      Returns:
      the expiration check interval seconds