- java.lang.Object
-
- com.ibm.oti.shared.SharedClassCacheInfo
-
public class SharedClassCacheInfo extends Object
SharedClassCacheInfo stores information about a shared class cache and provides methods to retrieve that information.
-
-
Field Summary
Fields Modifier and Type Field Description static intADDRESS_MODE_32Specifies a 32-bit cache.static intADDRESS_MODE_64Specifies a 64-bit cache.static intCOMPRESSED_REFSSpecifies a compressedRefs cache.static intCOMPRESSED_REFS_UNKNOWNThe compressedRefs mode is unknown for the cache.static intJVMLEVEL_JAVA5Specifies a Java 5 cache.static intJVMLEVEL_JAVA6Specifies a Java 6 cache.static intJVMLEVEL_JAVA7Specifies a Java 7 cache.static intJVMLEVEL_JAVA8Specifies a Java 8 cache.static intJVMLEVEL_JAVA9Specifies a Java 9 cache.static intNON_COMPRESSED_REFSSpecifies a non-compressedRefs cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetCacheAddressMode()Gets the address mode for the shared class cache.intgetCacheCompressedRefsMode()Get the compressedRefs mode for the shared class cache.longgetCacheFreeBytes()Gets the amount of free bytes in the shared class cache.intgetCacheJVMLevel()Gets the JVM level for the shared class cache.intgetCacheLayer()Get the layer number for the shared class cache.StringgetCacheName()Gets the cache name for the shared class cache.longgetCacheSize()Gets total usable shared class cache size.longgetCacheSoftMaxBytes()Get the soft limit for available space in the cache in bytes.intgetCacheType()Check the type of the shared class cache.DategetLastDetach()Gets the time when the shared class cache was last detached.intgetOSsemid()Gets the OS semaphore ID associated with the shared class cache.intgetOSshmid()Gets the OS shared memory ID associated with the shared class cache.booleanisCacheCompatible()Checks the compatibility of the shared class cache with this JVM.booleanisCacheCorrupt()Checks if the shared class cache is corrupt.booleanisCachePersistent()Deprecated.Use getCacheType() instead.
-
-
-
Field Detail
-
JVMLEVEL_JAVA5
public static final int JVMLEVEL_JAVA5
Specifies a Java 5 cache.- See Also:
- Constant Field Values
-
JVMLEVEL_JAVA6
public static final int JVMLEVEL_JAVA6
Specifies a Java 6 cache.- See Also:
- Constant Field Values
-
JVMLEVEL_JAVA7
public static final int JVMLEVEL_JAVA7
Specifies a Java 7 cache.- See Also:
- Constant Field Values
-
JVMLEVEL_JAVA8
public static final int JVMLEVEL_JAVA8
Specifies a Java 8 cache.- See Also:
- Constant Field Values
-
JVMLEVEL_JAVA9
public static final int JVMLEVEL_JAVA9
Specifies a Java 9 cache.- See Also:
- Constant Field Values
-
ADDRESS_MODE_32
public static final int ADDRESS_MODE_32
Specifies a 32-bit cache.- See Also:
- Constant Field Values
-
ADDRESS_MODE_64
public static final int ADDRESS_MODE_64
Specifies a 64-bit cache.- See Also:
- Constant Field Values
-
COMPRESSED_REFS
public static final int COMPRESSED_REFS
Specifies a compressedRefs cache.- See Also:
- Constant Field Values
-
NON_COMPRESSED_REFS
public static final int NON_COMPRESSED_REFS
Specifies a non-compressedRefs cache.- See Also:
- Constant Field Values
-
COMPRESSED_REFS_UNKNOWN
public static final int COMPRESSED_REFS_UNKNOWN
The compressedRefs mode is unknown for the cache.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCacheName
public String 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 public boolean 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
public Date 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_32orADDRESS_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_REFSorNON_COMPRESSED_REFSorCOMPRESSED_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
-
-