|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents the Garbage Collector of the JVM. (The GarbageCollection subsystem.)
| Method Summary | |
void |
addFinalizationListener(FinalizationListener listener)
Add listener to be notified whenever an Object has been finalized. |
void |
addFinalizationListener(FinalizationListener listener,
boolean onlyFailed)
Add listener to be notified whenever an Object has been finalized. |
void |
addGarbageCollectionListener(GarbageCollectionListener listener)
Adds a listener to be notified whenever a Garbage Collection run has been performed. |
void |
addGarbageCollectionStrategyChangeListener(GarbageCollectionStrategyChangeListener listener)
Adds a listener for the strategy change event (@see GarbageCollectionStrategyChangeEvent). |
java.lang.String |
getDescription()
A short description of the GC algorithm in use. |
java.util.Collection |
getGarbageCollectionStrategies()
Returns a collection of currently available GarbageCollectionStrategies (@see GarbageCollectionStrategy). |
GarbageCollectionStrategy |
getGarbageCollectionStrategy()
Returns the strategy currently being employed by the GarbageCollector. |
long |
getLastGCEnd()
Returns the time the last Garbage Collection run started. |
long |
getLastGCStart()
Returns the time the last Garbage Collection run started. |
long |
getNurserySize()
Returns the size of the nursery/youngspace in bytes. |
long |
getTotalGarbageCollectionCount()
Returns the total number of collection runs performed so far. |
long |
getTotalGarbageCollectionTime()
Returns the total time spent Garabage Collecting so far. |
boolean |
hasCompaction()
Returns true if this Garbage Collector compacts the heap. |
boolean |
isConcurrent()
Returns true if this Garbage Collector at some point collects garbage concurrently, i.e. in a separate thread running concurrently with the other threads. |
boolean |
isDynamic()
Returns true if the GC system is running in a dynamic mode, i.e. a mode that allows the strategy to change. |
boolean |
isGenerational()
Returns true if this memory model at some point uses a nursery/ young-space. |
boolean |
isIncremental()
Returns true if this Garbage Collector collects garbage incrementally (in small steps, train algorithm or similar). |
boolean |
isParallel()
Returns true if this Garbage Collector at some point runs in parallel on several processors when collecting garbage. |
boolean |
isSelfOptimizing()
Returns true if the GC system is running in a mode that will automatically choose GarbageCollectionStrategy for you. |
void |
removeFinalizationListener(FinalizationListener listener)
Removes the specified listener. |
void |
removeGarbageCollectionListener(GarbageCollectionListener listener)
Removes the specified GarbageCollectionListener. |
void |
removeGarbageCollectionStrategyChangeListener(GarbageCollectionStrategyChangeListener listener)
Removes a strategy change listener (@see GarbageCollectionStrategyChangeEvent). |
void |
setNurserySize(long nurserySize)
Sets the nursery size. |
void |
suggestGarbageCollectionStrategy(GarbageCollectionStrategy strategy)
Suggests a static garbage collector strategy to the system. |
| Method Detail |
public java.lang.String getDescription()
getDescription in interface DescribableDescribable.getDescription()
public boolean isGenerational()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public boolean hasCompaction()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public boolean isIncremental()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public boolean isConcurrent()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public boolean isParallel()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public long getTotalGarbageCollectionCount()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public long getLastGCStart()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public long getLastGCEnd()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public long getTotalGarbageCollectionTime()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this JVM.
public long getNurserySize()
throws NotAvailableException
NotAvailableException - if this functionality isn't available in
this Garbage Collector or JVM.
public void setNurserySize(long nurserySize)
throws NotAvailableException
nurserySize - the new size of the nursery.
NotAvailableException - if the functionality isn't supported
in this JVM, or if the current GarbageCollectionStrategy in use lacks
a nursery (i.e. isGenerational() == false).
public void addGarbageCollectionListener(GarbageCollectionListener listener)
throws NotAvailableException
listener - the listener to use.
NotAvailableException - if this functionality isn't available in
this JVM.
public void removeGarbageCollectionListener(GarbageCollectionListener listener)
throws NotAvailableException
listener - the listener to remove.
NotAvailableException - if this functionality isn't available in
this JVM.
public void addFinalizationListener(FinalizationListener listener)
throws NotAvailableException
listener - the listener to receive events whenever an object is
finalized.
NotAvailableException - if this functionality isn't available in
this JVM.
public void addFinalizationListener(FinalizationListener listener,
boolean onlyFailed)
throws NotAvailableException
listener - the listener to add.onlyFailed - whether to only send events for finalizers that fail
(i.e. throw an exception).
NotAvailableException - if this functionality isn't available in
this JVM.
public void removeFinalizationListener(FinalizationListener listener)
throws NotAvailableException
listener - the listener to remove.
NotAvailableException - if this functionality isn't available in
this JVM.
public java.util.Collection getGarbageCollectionStrategies()
throws NotAvailableException
NotAvailableException - if not supported
by the VM.
public GarbageCollectionStrategy getGarbageCollectionStrategy()
throws NotAvailableException
NotAvailableException
public void suggestGarbageCollectionStrategy(GarbageCollectionStrategy strategy)
throws NotAvailableException
Note that:
strategy - the suggested garbage collector state.
NotAvailableException - if this functionality isn't available
in this Garbage Collector or JVM.
public boolean isDynamic()
throws NotAvailableException
NotAvailableException - if this functionality isn't available
in this Garbage Collector or JVM.
public boolean isSelfOptimizing()
throws NotAvailableException
NotAvailableException - if this functionality isn't available
in this Garbage Collector or JVM.
public void addGarbageCollectionStrategyChangeListener(GarbageCollectionStrategyChangeListener listener)
throws NotAvailableException
listener - the listener to add.
NotAvailableException - if this functionality isn't available
in this Garbage Collector or JVM.
public void removeGarbageCollectionStrategyChangeListener(GarbageCollectionStrategyChangeListener listener)
throws NotAvailableException
listener - the listener to remove.
NotAvailableException - if this functionality isn't available
in this Garbage Collector or JVM.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||