public abstract class FinalizeObject extends WeakReference<Object> implements com.gemstone.gnu.trove.TLinkable
Object.finalize() vs the approach below, so former should be removed
from all code and never used in product code. It also leads to significant
delays in GC itself leading to memory buildups.| Modifier and Type | Class and Description |
|---|---|
static interface |
FinalizeObject.BatchFinalize
Interface that finalizers (extensions of FinalizeObject) can implement to
indicate batching of finalization where possible e.g.
|
static class |
FinalizeObject.State
Simple wrapper class to share state across the base object and
FinalizeObject. |
| Modifier | Constructor and Description |
|---|---|
protected |
FinalizeObject(Object referent,
boolean server) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
clearAll() |
static void |
clearFinalizationQueues() |
protected abstract void |
clearThis() |
protected abstract boolean |
doFinalize()
The finalizer method for the object for post GC cleanup.
|
static FinalizeHolder |
getClientHolder() |
protected abstract FinalizeHolder |
getHolder() |
com.gemstone.gnu.trove.TLinkable |
getNext() |
com.gemstone.gnu.trove.TLinkable |
getPrevious() |
static FinalizeHolder |
getServerHolder() |
void |
setNext(com.gemstone.gnu.trove.TLinkable linkable) |
void |
setPrevious(com.gemstone.gnu.trove.TLinkable linkable) |
enqueue, get, isEnqueuedprotected FinalizeObject(Object referent, boolean server)
public static FinalizeHolder getServerHolder()
public static FinalizeHolder getClientHolder()
public static void clearFinalizationQueues()
public final void clearAll()
public final com.gemstone.gnu.trove.TLinkable getNext()
getNext in interface com.gemstone.gnu.trove.TLinkablepublic final com.gemstone.gnu.trove.TLinkable getPrevious()
getPrevious in interface com.gemstone.gnu.trove.TLinkablepublic final void setNext(com.gemstone.gnu.trove.TLinkable linkable)
setNext in interface com.gemstone.gnu.trove.TLinkablepublic final void setPrevious(com.gemstone.gnu.trove.TLinkable linkable)
setPrevious in interface com.gemstone.gnu.trove.TLinkableprotected abstract FinalizeHolder getHolder()
protected abstract void clearThis()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.