Interface LivenessReferent
- All Known Subinterfaces:
DynamicTable,LazySnapshotTable,Listener,ListenerBase,LivenessNode,RemoteTableHandle.TableProxy,ShiftAwareListener,Table,TableMap,TableMapProxyHandler.TableMapProxy
- All Known Implementing Classes:
AddedTableLoggingListener,AppendOnlyArrayBackedMutableTable,AppendOnlyAssertionInstrumentedListenerAdapter,AutoTuningIncrementalReleaseFilter,BaseIncrementalReleaseFilter,BaseTable,BaseTable.ListenerImpl,BaseTable.ShiftAwareListenerImpl,BucketedChunkedAjMergedListener,ClockFilter,ComposedFilter,ConjunctiveFilter,ConnectionAwareRemoteTable,DeferredViewTable,DeferredViewTable.SimpleTableReference,DeferredViewTable.TableReference,DisjunctiveFilter,DynamicTableToAdoConverter,DynamicWhereFilter,FilteredTableMap,FullTableLoggingListener,HierarchicalTable,IncrementalReleaseFilter,InitialSnapshotTable,InMemoryTable,InstrumentedListener,InstrumentedListenerAdapter,InstrumentedListenerBase,InstrumentedShiftAwareListener,InstrumentedShiftAwareListenerAdapter,JoinListenerRecorder,KeyedArrayBackedMutableTable,LastByTableImportState.ResultTableMap,ListenerRecorder,LivenessArtifact,LivenessScope,LivePivotWidget,LiveQueryTable,LiveTableRefreshCombiner,LocalTableMap,MergedListener,NestedPartitionedDiskBackedTable,ParameterizedQueryServerImpl.ParameterizedQueryServerLivenessScope,ParameterSession,PartitionAwareSourceTable,PreemptiveUpdatesTable,PrintListener,QueryReplayGroupedTable,QueryTable,QueryTable.FilteredTable,RedefinableTable,ReferenceCountedLivenessNode,RefreshingAccountFilter,RefreshingAccountRootFilter,RefreshingGroupFilter,RefreshingMysqlFilter,RefreshingStrategyFilter,ReplayGroupedFullTable,ReplayLastByGroupedTable,ReplayTable,ReplicatedTable,ReverseLookupListener,RollingReleaseFilter,SelectFilterLivenessArtifactImpl,ShiftAwareSwapListener,SimpleSourceTable,SnapshotIncrementalListener,SnapshotInternalListener,SortedAssertionInstrumentedListenerAdapter,SortedClockFilter,SortListener,SourceTable,SourceTable.QueryTableReference,SplayedDiskBackedTable,SubscriptionSnapshotTable,SwapListener,SwapListenerBase,TableLogger,TableMapClient,TableMapImpl,TableMapProxyHandler,TableMapSupplier,TableSupplier,TimeSeriesFilter,TimeTable,ToMapListener,UncoalescedTable,UnsortedClockFilter,UpdatableTable,WrappedDelegatingTable,ZeroKeyChunkedAjMergedListener
public interface LivenessReferent
Interface for objects that continue to "live" while retained by a
LivenessManager.-
Method Summary
Modifier and TypeMethodDescriptionvoidDrop a previously-retained reference to this referent.default StringGet a name that is suitable for uniquely identifying thisLivenessReferentin debug and error messages.WeakReference<? extends LivenessReferent>Get aWeakReferenceto this referent.default voidRecord a reference to thisLivenessReferent, which must later be dropped.booleanIf this referent is "live", behave asretainReference()and return true.
-
Method Details
-
retainReference
default void retainReference()Record a reference to thisLivenessReferent, which must later be dropped.- Throws:
com.illumon.iris.db.util.liveness.LivenessStateException- If this referent is no longer "live"
-
tryRetainReference
boolean tryRetainReference()If this referent is "live", behave asretainReference()and return true. Otherwise, returns false rather than throwing an exception.- Returns:
- True if this referent was retained, false otherwise
-
dropReference
void dropReference()Drop a previously-retained reference to this referent. -
getWeakReference
WeakReference<? extends LivenessReferent> getWeakReference()Get aWeakReferenceto this referent. This may be cached, or newly created.- Returns:
- A new or cached reference to this referent
-
getReferentDescription
Get a name that is suitable for uniquely identifying thisLivenessReferentin debug and error messages. This is usually not the same asObject.toString().- Returns:
- A unique name for this referent for debugging and error message purposes
-