public class LiveTableRefreshCombiner extends LivenessArtifact implements LiveTable, LiveTableRegistrar
LiveTables into a single one, in order to allow for update parallelization within the
LiveTableMonitor.| Constructor and Description |
|---|
LiveTableRefreshCombiner() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTable(LiveTable liveTable)
Add a table to this registrar.
|
void |
destroy()
Attempt to release (destructively when necessary) resources held by this object.
|
void |
dropReference()
Drop a previously-retained reference to this referent.
|
WeakReference<? extends LivenessReferent> |
getWeakReference()
Get a
WeakReference to this referent. |
void |
initializeTransientFieldsForLiveness()
Package-private for
Serializable sub-classes to use in readObject only. |
protected void |
onReferenceCountAtZero()
Callback method that will be invoked when the reference count returns to zero.
|
void |
refresh()
Refresh this LiveTable.
|
void |
removeTable(LiveTable liveTable)
Remove a table from this registrar.
|
boolean |
tryManage(LivenessReferent referent)
Attempt to add the specified referent to this manager.
|
boolean |
tryRetainReference()
If this referent is "live", behave as
LivenessReferent.retainReference() and return true. |
manageWithCurrentScope, unmanage, unmanageappend, decrementReferenceCount, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReferentDescription, retainReferencemanagepublic void refresh()
LiveTablepublic void addTable(@NotNull
LiveTable liveTable)
LiveTableRegistraraddTable in interface LiveTableRegistrarliveTable - The table to addpublic void removeTable(@NotNull
LiveTable liveTable)
LiveTableRegistrarremoveTable in interface LiveTableRegistrarliveTable - The table to removepublic void destroy()
Attempt to release (destructively when necessary) resources held by this object. This may render the object unusable for subsequent operations. Implementations should be sure to call super.destroy().
This is intended to only ever be used as a side effect of decreasing the reference count to 0.
@VisibleForTesting public final void initializeTransientFieldsForLiveness()
Serializable sub-classes to use in readObject only.
Public to allow unit tests in another package to work around mock issues where the constructor is never invoked.public final boolean tryRetainReference()
LivenessReferentLivenessReferent.retainReference() and return true.
Otherwise, returns false rather than throwing an exception.tryRetainReference in interface LivenessReferentpublic final void dropReference()
LivenessReferentdropReference in interface LivenessReferentpublic WeakReference<? extends LivenessReferent> getWeakReference()
LivenessReferentWeakReference to this referent. This may be cached, or newly created.getWeakReference in interface LivenessReferentpublic final boolean tryManage(@NotNull
LivenessReferent referent)
LivenessManagertryManage in interface LivenessManagerreferent - The referent to addprotected final void onReferenceCountAtZero()
ReferenceCountedonReferenceCountAtZero in class ReferenceCounted