Cache
Contains cache settings.
Fields
| Field | Description |
|---|---|
| Reallocated |
Methods
| Method | Description |
|---|---|
| getExactReallocateOnly() | Gets or sets a value indicating whether reallocation should be exact or not. If reallocation is non exact the performance should be higher. |
| 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. |
| getCacheFolder() | Gets or sets the cache folder. |
| setCacheFolder(String value) | Gets or sets the cache folder. |
| getAllocatedMemoryBytesCount() | Gets the allocated in-memory bytes count. |
| getAllocatedDiskBytesCount() | Gets the allocated disk bytes count. |
| getMaxMemoryForCache() | Gets or sets the maximum available memory for cache in memory. The value specified is megabytes count. |
| setMaxMemoryForCache(int value) | Gets or sets the maximum available memory for cache in memory. The value specified is megabytes count. |
| getMaxDiskSpaceForCache() | Gets or sets the maximum available disk space for cache. The value specified is megabytes count. |
| setMaxDiskSpaceForCache(int value) | Gets or sets the maximum available disk space for cache. The value specified is megabytes count. |
| getCacheType() | Gets or sets the cache scheme used. |
| setCacheType(int value) | Gets or sets the cache scheme used. |
| setDefaults() | Sets the Cache settings to defaults. |
Reallocated
public static final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> Reallocated
Returns: com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler>
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: boolean - 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(boolean value)
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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | 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: String - The cache folder.
setCacheFolder(String value)
public static void setCacheFolder(String value)
Gets or sets the cache folder.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | String | The cache folder. |
getAllocatedMemoryBytesCount()
public static long getAllocatedMemoryBytesCount()
Gets the allocated in-memory bytes count.
Returns: long - The allocated in-memory bytes count.
getAllocatedDiskBytesCount()
public static long getAllocatedDiskBytesCount()
Gets the allocated disk bytes count.
Returns: long - 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: int - The maximum memory for cache. Value of 0 will consume all available memory and serves as no upper limit.
setMaxMemoryForCache(int value)
public static void setMaxMemoryForCache(int value)
Gets or sets the maximum available memory for cache in memory. The value specified is megabytes count.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | 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: int - The maximum available disk space for cache. Value of 0 will consume all available memory and serves as no upper limit.
setMaxDiskSpaceForCache(int value)
public static void setMaxDiskSpaceForCache(int value)
Gets or sets the maximum available disk space for cache. The value specified is megabytes count.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | 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: int - The cache scheme used.
setCacheType(int value)
public static void setCacheType(int value)
Gets or sets the cache scheme used.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | The cache scheme used. |
setDefaults()
public static void setDefaults()
Sets the Cache settings to defaults.