com.ibm.oti.shared
Class SharedClassUtilities
- java.lang.Object
com.ibm.oti.shared.SharedClassUtilities
- public class SharedClassUtilities
- extends java.lang.Object
Field Summary
Modifier and Type | Field and Description |
---|---|
|
DESTROY_FAILED_CURRENT_GEN_CACHE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate the method has failed to destroy the
current generation cache.
|
|
DESTROY_FAILED_OLDER_GEN_CACHE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate the method has failed to destroy one
or more older generation cache, and either a current generation cache does not exist or is successfully destroyed.
|
|
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.
|
|
DESTROYED_NONE
Returned by
destroySharedCache(java.lang.String, int, java.lang.String, boolean) to indicate the method failed to destroy any cache.
|
|
NO_FLAGS
Value to be passed to
flags parameter of getSharedCacheInfo(java.lang.String, int, boolean) method.
|
|
NONPERSISTENT
Specifies a non-persistent cache.
|
|
PERSISTENCE_DEFAULT
Use the platform dependent default value as the cache type.
|
|
PERSISTENT
Specifies a persistent cache.
|
Constructor Summary
Constructor and Description |
---|
SharedClassUtilities()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
destroySharedCache(java.lang.String cacheDir,int persistence,java.lang.String cacheName,boolean useCommandLineValues)
Destroy a named shared class cache of a given type in a given directory.
|
|
getSharedCacheInfo(java.lang.String cacheDir,int flags,boolean useCommandLineValues)
Iterate through all shared class caches present in the given directory and return their information in
a
List .
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
NO_FLAGS
- public static final int NO_FLAGS
PERSISTENCE_DEFAULT
- public static final int PERSISTENCE_DEFAULT
PERSISTENT
- public static final int PERSISTENT
NONPERSISTENT
- public static final int NONPERSISTENT
DESTROYED_ALL_CACHE
- 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.
DESTROYED_NONE
- public static final int DESTROYED_NONE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate the method failed to destroy any cache.
DESTROY_FAILED_CURRENT_GEN_CACHE
- public static final int DESTROY_FAILED_CURRENT_GEN_CACHE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate the method has failed to destroy the
current generation cache.
DESTROY_FAILED_OLDER_GEN_CACHE
- public static final int DESTROY_FAILED_OLDER_GEN_CACHE
destroySharedCache(java.lang.String, int, java.lang.String, boolean)
to indicate the method has failed to destroy one
or more older generation cache, and either a current generation cache does not exist or is successfully destroyed.
Constructor Detail
SharedClassUtilities
- public SharedClassUtilities()
Method Detail
getSharedCacheInfo
- 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 case, use the platform dependent default value.
cacheDir
- Absolute path of the directory to look for the shared class caches flags
- Reserved for future use. Always pass NO_FLAGS
useCommandLineValues
- Use command line values instead of using parameter values SharedClassCacheInfo
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 (i.e. -Xshareclasses:none is present).
IllegalArgumentException
if flags is not a valid value.
destroySharedCache
- public static int destroySharedCache( java.lang.String cacheDir,
- int persistence,
- 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.
Return value of this method depends on the status of existing current and older generation caches.
- If it fails to destroy any existing cache with the given name, it returns
DESTROYED_NONE
. - If no cache exists or it is able to destroy all existing caches of all generations, it returns
DESTROYED_ALL_CACHE
.
- If it fails to destroy an existing current generation cache, irrespective of the state of older generation
cache(s), it returns
DESTROY_FAILED_CURRENT_GEN_CACHE
.
- If it fails to destroy one or more older generation cache and either a current generation cache does not
exist or is successfully destroyed, it returns
DESTROY_FAILED_OLDER_GEN_CACHE
.
cacheDir
- Absolute path of the directory where the shared class cache is present persistence
- Type of the cache. One of:
cacheName
- Name of the cache to be deleted useCommandLineValues
- Use command line values instead of using parameter values java.lang.IllegalStateException
- if shared classes is disabled for this JVM (i.e. -Xshareclasses:none is present).
IllegalArgumentException
if persistence is not a valid value.
flags
parameter ofgetSharedCacheInfo(java.lang.String, int, boolean)
method.