Packages

 

com.aspose.cad

Class Cache



  • public class Cache
    extends Object

    Contains cache settings.

    • Field Detail

      • Reallocated

        public static final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> Reallocated
    • Method Detail

      • getExactReallocateOnly

        public static boolean getExactReallocateOnly()

        Gets or sets a value indicating whether reallocation should be exact or not. If reallocation is non exact the performance should be higher.

        Returns:
        true if reallocation is exact; otherwise, false.


        The exact reallocation will perform reallocation of additional memory only up to the upper limit specified. When passing upper limit for in-memory during reallocation the cached data will be copied to disk if possible. When passing upper limit for disk memory during reallocation the appropriate exception is thrown. The performance should be higher if this option is turned off as no additional copying will be performed if possible, however this may also lead to pass upper limits specified for memory or disk.
      • setExactReallocateOnly

        public static void setExactReallocateOnly(boolean value)

        Gets or sets a value indicating whether reallocation should be exact or not. If reallocation is non exact the performance should be higher.

        Parameters:
        value - true if reallocation is exact; otherwise, false.


        The exact reallocation will perform reallocation of additional memory only up to the upper limit specified. When passing upper limit for in-memory during reallocation the cached data will be copied to disk if possible. When passing upper limit for disk memory during reallocation the appropriate exception is thrown. The performance should be higher if this option is turned off as no additional copying will be performed if possible, however this may also lead to pass upper limits specified for memory or disk.
      • getCacheFolder

        public static String getCacheFolder()

        Gets or sets the cache folder.

        Returns:
        The cache folder.
      • setCacheFolder

        public static void setCacheFolder(String value)

        Gets or sets the cache folder.

        Parameters:
        value - The cache folder.
      • getAllocatedMemoryBytesCount

        public static long getAllocatedMemoryBytesCount()

        Gets the allocated in-memory bytes count.

        Returns:
        The allocated in-memory bytes count.
      • getAllocatedDiskBytesCount

        public static long getAllocatedDiskBytesCount()

        Gets the allocated disk bytes count.

        Returns:
        The allocated disk bytes count.
      • getMaxMemoryForCache

        public static int getMaxMemoryForCache()

        Gets or sets the maximum available memory for cache in memory. The value specified is megabytes count.

        Returns:
        The maximum memory for cache.


        Value of 0 will consume all available memory and serves as no upper limit.
      • setMaxMemoryForCache

        public static void setMaxMemoryForCache(int value)

        Gets or sets the maximum available memory for cache in memory. The value specified is megabytes count.

        Parameters:
        value - The maximum memory for cache.


        Value of 0 will consume all available memory and serves as no upper limit.
      • getMaxDiskSpaceForCache

        public static int getMaxDiskSpaceForCache()

        Gets or sets the maximum available disk space for cache. The value specified is megabytes count.

        Returns:
        The maximum available disk space for cache.


        Value of 0 will consume all available memory and serves as no upper limit.
      • setMaxDiskSpaceForCache

        public static void setMaxDiskSpaceForCache(int value)

        Gets or sets the maximum available disk space for cache. The value specified is megabytes count.

        Parameters:
        value - The maximum available disk space for cache.


        Value of 0 will consume all available memory and serves as no upper limit.
      • getCacheType

        public static int getCacheType()

        Gets or sets the cache scheme used.

        Returns:
        The cache scheme used.
      • setCacheType

        public static void setCacheType(int value)

        Gets or sets the cache scheme used.

        Parameters:
        value - The cache scheme used.
      • setDefaults

        public static void setDefaults()

        Sets the Cache settings to defaults.