Cache

Inheritance: java.lang.Object

public final class Cache

Contains cache settings.

Methods

MethodDescription
equals(Object arg0)
getAllocatedDiskBytesCount()Gets the allocated disk bytes count.
getAllocatedMemoryBytesCount()Gets the allocated in-memory bytes count.
getCacheFolder()Gets the cache folder.
getCacheType()Gets or sets the cache scheme used.
getClass()
getExactReallocateOnly()Gets a value indicating whether reallocation should be exact or not.
getMaxDiskSpaceForCache()Gets the maximum available disk space for cache.
getMaxMemoryForCache()Gets the maximum available memory for cache in memory.
hashCode()
notify()
notifyAll()
setCacheFolder(String value)Sets the cache folder.
setCacheType(int value)Sets the cache scheme used.
setDefaults()Sets the Cache settings to defaults.
setExactReallocateOnly(boolean value)Sets a value indicating whether reallocation should be exact or not.
setMaxDiskSpaceForCache(int value)Sets the maximum available disk space for cache.
setMaxMemoryForCache(int value)Sets the maximum available memory for cache in memory.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAllocatedDiskBytesCount()

public static long getAllocatedDiskBytesCount()

Gets the allocated disk bytes count.

Returns: long - The allocated disk bytes count.

getAllocatedMemoryBytesCount()

public static long getAllocatedMemoryBytesCount()

Gets the allocated in-memory bytes count.

Returns: long - The allocated in-memory bytes count.

getCacheFolder()

public static String getCacheFolder()

Gets the cache folder.

Returns: java.lang.String - The cache folder.

getCacheType()

public static int getCacheType()

Gets or sets the cache scheme used.

Returns: int - The cache scheme used.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getExactReallocateOnly()

public static boolean getExactReallocateOnly()

Gets 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.

getMaxDiskSpaceForCache()

public static int getMaxDiskSpaceForCache()

Gets 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.

getMaxMemoryForCache()

public static int getMaxMemoryForCache()

Gets 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.

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setCacheFolder(String value)

public static void setCacheFolder(String value)

Sets the cache folder.

Parameters:

ParameterTypeDescription
valuejava.lang.StringThe cache folder.

setCacheType(int value)

public static void setCacheType(int value)

Sets the cache scheme used.

Parameters:

ParameterTypeDescription
valueintThe cache scheme used.

setDefaults()

public static void setDefaults()

Sets the Cache settings to defaults.

setExactReallocateOnly(boolean value)

public static void setExactReallocateOnly(boolean value)

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

Parameters:

ParameterTypeDescription
valuebooleantrue 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. |

setMaxDiskSpaceForCache(int value)

public static void setMaxDiskSpaceForCache(int value)

Sets the maximum available disk space for cache. The value specified is megabytes count.

Parameters:

ParameterTypeDescription
valueintThe maximum available disk space 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)

Sets the maximum available memory for cache in memory. The value specified is megabytes count.

Parameters:

ParameterTypeDescription
valueintThe maximum memory for cache.

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

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int