Class SharedClassCacheInfo
java.lang.Object
com.ibm.oti.shared.SharedClassCacheInfo
SharedClassCacheInfo stores information about a shared class cache and
provides methods to retrieve that information.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Specifies a 32-bit cache.static final int
Specifies a 64-bit cache.static final int
Specifies a compressedRefs cache.static final int
The compressedRefs mode is unknown for the cache.static final int
Specifies a Java 5 cache.static final int
Specifies a Java 6 cache.static final int
Specifies a Java 7 cache.static final int
Specifies a Java 8 cache.static final int
Specifies a Java 9 cache.static final int
Specifies a non-compressedRefs cache. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the address mode for the shared class cache.int
Get the compressedRefs mode for the shared class cache.long
Gets the amount of free bytes in the shared class cache.int
Gets the JVM level for the shared class cache.int
Get the layer number for the shared class cache.Gets the cache name for the shared class cache.long
Gets total usable shared class cache size.long
Get the soft limit for available space in the cache in bytes.int
Check the type of the shared class cache.Gets the time when the shared class cache was last detached.int
Gets the OS semaphore ID associated with the shared class cache.int
Gets the OS shared memory ID associated with the shared class cache.boolean
Checks the compatibility of the shared class cache with this JVM.boolean
Checks if the shared class cache is corrupt.boolean
Deprecated.Use getCacheType() instead.
-
Field Details
-
JVMLEVEL_JAVA5
public static final int JVMLEVEL_JAVA5Specifies a Java 5 cache.- See Also:
-
JVMLEVEL_JAVA6
public static final int JVMLEVEL_JAVA6Specifies a Java 6 cache.- See Also:
-
JVMLEVEL_JAVA7
public static final int JVMLEVEL_JAVA7Specifies a Java 7 cache.- See Also:
-
JVMLEVEL_JAVA8
public static final int JVMLEVEL_JAVA8Specifies a Java 8 cache.- See Also:
-
JVMLEVEL_JAVA9
public static final int JVMLEVEL_JAVA9Specifies a Java 9 cache.- See Also:
-
ADDRESS_MODE_32
public static final int ADDRESS_MODE_32Specifies a 32-bit cache.- See Also:
-
ADDRESS_MODE_64
public static final int ADDRESS_MODE_64Specifies a 64-bit cache.- See Also:
-
COMPRESSED_REFS
public static final int COMPRESSED_REFSSpecifies a compressedRefs cache.- See Also:
-
NON_COMPRESSED_REFS
public static final int NON_COMPRESSED_REFSSpecifies a non-compressedRefs cache.- See Also:
-
COMPRESSED_REFS_UNKNOWN
public static final int COMPRESSED_REFS_UNKNOWNThe compressedRefs mode is unknown for the cache.- See Also:
-
-
Method Details
-
getCacheName
Gets the cache name for the shared class cache.- Returns:
- Name of the shared class cache.
-
isCacheCompatible
public boolean isCacheCompatible()Checks the compatibility of the shared class cache with this JVM.- Returns:
- true if cache is compatible with this JVM, false otherwise.
-
isCachePersistent
Deprecated.Use getCacheType() instead.Checks if the shared class cache is persistent.- Returns:
- true if cache is persistent, false otherwise.
-
getCacheType
public int getCacheType()Check the type of the shared class cache. -
getOSshmid
public int getOSshmid()Gets the OS shared memory ID associated with the shared class cache.- Returns:
- A valid value if cache is non-persistent and shared memory id is available, else -1.
-
getOSsemid
public int getOSsemid()Gets the OS semaphore ID associated with the shared class cache.- Returns:
- A valid value if cache is non-persistent and semaphore id is available, else -1.
-
getLastDetach
Gets the time when the shared class cache was last detached.- Returns:
- Date, or null if last detach time is not available.
-
getCacheJVMLevel
public int getCacheJVMLevel()Gets the JVM level for the shared class cache. Starting from Java 10, the JVM LEVEL equals to the java version number on which the share class cache is created.- Returns:
- A JVMLEVEL constant.
-
getCacheAddressMode
public int getCacheAddressMode()Gets the address mode for the shared class cache.- Returns:
- Either
ADDRESS_MODE_32
orADDRESS_MODE_64
-
isCacheCorrupt
public boolean isCacheCorrupt()Checks if the shared class cache is corrupt.- Returns:
- true if the cache is corrupt, false otherwise.
-
getCacheSize
public long getCacheSize()Gets total usable shared class cache size. Returns -1 if cache is incompatible.- Returns:
- Number of usable bytes in cache.
-
getCacheFreeBytes
public long getCacheFreeBytes()Gets the amount of free bytes in the shared class cache. Returns -1 if cache is incompatible.- Returns:
- long
-
getCacheSoftMaxBytes
public long getCacheSoftMaxBytes()Get the soft limit for available space in the cache in bytes. Returns -1 if cache is incompatible or cache size if it is not set.- Returns:
- long
-
getCacheCompressedRefsMode
public int getCacheCompressedRefsMode()Get the compressedRefs mode for the shared class cache.- Returns:
- Either
COMPRESSED_REFS
orNON_COMPRESSED_REFS
orCOMPRESSED_REFS_UNKNOWN
-
getCacheLayer
public int getCacheLayer()Get the layer number for the shared class cache.- Returns:
- The shared cache layer number or -1 if the shared cache does not have a layer number
-