public class SharedClassUtilities
extends java.lang.Object
SharedClassCacheInfo
Modifier and Type | Field and Description |
---|---|
static int |
DESTROY_FAILED_CURRENT_GEN_CACHE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate that the method has failed to destroy the
current generation cache. |
static int |
DESTROY_FAILED_OLDER_GEN_CACHE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate that the method has failed to destroy one
or more older generation caches, and either a current generation cache does not exist or is successfully destroyed. |
static int |
DESTROYED_ALL_CACHE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate either no cache exists
or the method has successfully destroyed caches of all generations. |
static int |
DESTROYED_NONE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate that the method failed to destroy any cache. |
static int |
NO_FLAGS
Value to be passed to
flags parameter of the getSharedCacheInfo(java.lang.String, int, boolean) method. |
static int |
NONPERSISTENT
Specifies a non-persistent cache.
|
static int |
PERSISTENCE_DEFAULT
Uses the platform dependent default value as the cache type.
|
static int |
PERSISTENT
Specifies a persistent cache.
|
static int |
SNAPSHOT
Specifies a cache snapshot.
|
Constructor and Description |
---|
SharedClassUtilities()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static int |
destroySharedCache(java.lang.String cacheDir,
int cacheType,
java.lang.String cacheName,
boolean useCommandLineValues)
Destroys a named shared class cache of a given type in a given directory.
|
static java.util.List<SharedClassCacheInfo> |
getSharedCacheInfo(java.lang.String cacheDir,
int flags,
boolean useCommandLineValues)
Iterates through all shared class caches present in the given directory and returns their information in
a
List . |
public static final int NO_FLAGS
flags
parameter of the getSharedCacheInfo(java.lang.String, int, boolean)
method.public static final int PERSISTENCE_DEFAULT
public static final int PERSISTENT
public static final int NONPERSISTENT
public static final int SNAPSHOT
public static final int DESTROYED_ALL_CACHE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate either no cache exists
or the method has successfully destroyed caches of all generations.public static final int DESTROYED_NONE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate that the method failed to destroy any cache.public static final int DESTROY_FAILED_CURRENT_GEN_CACHE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate that the method has failed to destroy the
current generation cache.public static final int DESTROY_FAILED_OLDER_GEN_CACHE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate that the method has failed to destroy one
or more older generation caches, and either a current generation cache does not exist or is successfully destroyed.@Deprecated public SharedClassUtilities()
public static java.util.List<SharedClassCacheInfo> getSharedCacheInfo(java.lang.String cacheDir, int flags, boolean useCommandLineValues)
List
.
If useCommandLineValues
is true
then use the command line value as the directory to search in.
If the command line value is not available, use the platform dependent default value.
If useCommandLineValues
is false
, then use cacheDir
as the directory to search in.
cacheDir
can be null
. In such a case, use the platform dependent default value.
cacheDir
- Absolute path of the directory to look for the shared class cachesflags
- Reserved for future use. Always pass NO_FLAGS
useCommandLineValues
- Use command line values instead of using parameter valuesSharedClassCacheInfo
corresponding to shared class caches which are present
in the specified directory, null
on failure.java.lang.IllegalStateException
- If shared classes is disabled for this JVM (that is -Xshareclasses:none is present).java.lang.IllegalArgumentException
- If flags
is not a valid value.java.lang.SecurityException
- If a security manager is enabled and the calling thread does not
have SharedClassesNamedPermission("getSharedCacheInfo")public static int destroySharedCache(java.lang.String cacheDir, int cacheType, java.lang.String cacheName, boolean useCommandLineValues)
If useCommandLineValues
is true
, then use the command line value to get the shared class cache name,
its type and its directory. If any of these is not available, then use the default value.
If useCommandLineValues
is false
, then use cacheDir
, persistence
, and
cacheName
to identify the cache to be destroyed. To accept the default value for cacheDir
or cacheName
, specify the parameter with a null
value.
The return value of this method depends on the status of existing current and older generation caches.
DESTROYED_NONE
.
DESTROYED_ALL_CACHE
.DESTROY_FAILED_CURRENT_GEN_CACHE
.DESTROY_FAILED_OLDER_GEN_CACHE
.cacheDir
- Absolute path of the directory where the shared class cache is presentcacheType
- Type of the cache. The type has one of the following values:
cacheName
- Name of the cache to be deleteduseCommandLineValues
- Use command line values instead of using parameter valuesjava.lang.IllegalStateException
- If shared classes is disabled for this JVM (that is -Xshareclasses:none is present).java.lang.IllegalArgumentException
- If cacheType
is not a valid value.java.lang.SecurityException
- If a security manager is enabled and the calling thread does not
have SharedClassesNamedPermission("destroySharedCache")Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1998, 2025 IBM Corp. and others.