|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents a Garbage Collector in the JVM.
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. |
java.lang.String |
getDescription()
A short description of the GC algorithm in use. |
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 collects garbage concurrently, i.e. in a separate thread running concurrently with the other threads. |
boolean |
isGenerational()
Returns true if this memory model 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 runs in parallel on several processors when collecting garbage. |
void |
removeFinalizationListener(FinalizationListener listener)
Removes the specified listener. |
void |
removeGarbageCollectionListener(GarbageCollectionListener listener)
Removes the specified GarbageCollectionListener. |
Method Detail |
public java.lang.String getDescription()
getDescription
in interface Describable
Describable.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 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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |