Class ReadOnlyLocalTableLocation
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
,DeephavenFormatTableLocation
,TableLocation
,TableLocationKey
,TableLocationState
,NamedImplementation
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.locations.TableLocation
TableLocation.Format, TableLocation.Listener
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.locations.TableLocationKey
TableLocationKey.ComparatorImpl, TableLocationKey.KeyedObjectKeyImpl<VALUE_TYPE>, TableLocationKey.SelfKeyedObjectKeyImpl<VALUE_TYPE extends TableLocationKey>
-
Field Summary
Fields inherited from class com.illumon.iris.db.v2.locations.local.LocalTableLocation
CHECKPOINT_RECORD_FILE_NAME
Fields inherited from class com.illumon.iris.db.v2.locations.AbstractTableLocation
cachedGroupings, NO_GROUPING_SENTINEL
Fields inherited from class com.illumon.iris.db.v2.locations.SubscriptionAggregator
subscriptions
Fields inherited from interface com.illumon.iris.db.v2.locations.TableLocationKey
COMPARATOR, NULL_PARTITION
Fields inherited from interface com.illumon.iris.db.v2.locations.TableLocationState
NULL_SIZE, NULL_TIME, REMOVE_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyLocalTableLocation
(TableKey tableKey, TableLocationKey tableLocationKey, File directory, boolean supportsSubscriptions, TableDataRefreshService refreshService) Create a newReadOnlyLocalTableLocation
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Refresh and activate update pushing from the implementing class.protected void
Deactivate pushed updates from the implementing class.Get a name for the implementing class.protected <T> boolean
matchSubscriptionToken
(T token) Verify that a notification pertains to a currently-active subscription.void
refresh()
Initialize or refresh state information.Methods inherited from class com.illumon.iris.db.v2.locations.local.LocalTableLocation
ensureReaderCheckpointInitialized, getCheckpointRecordFile, getCheckpointRecordFile, getColumnVersion, getDataIndexImpl, getDirectory, getReaderCheckpointRecord, getSortedColumns, getTableDefinition, hasDataIndexFor, makeColumnLocation, readCheckpointRecordForImporters, readCheckpointRecordForImporters, readCheckpointRecordForImporters, readCheckpointRecordForImportersFromFile, readCheckpointRecordForImportersFromFile, readCheckpointRecordForImportersFromFile, readCheckpointRecordForSerialConsumers, refreshReaderCheckpointRecord, setSnapshot, writeCheckpointRecord
Methods inherited from class com.illumon.iris.db.v2.locations.AbstractTableLocation
clearColumnLocations, deliverInitialSnapshot, getColumnLocation, getColumnPartition, getDataIndex, getInternalPartition, getLastModifiedTimeMillis, getSize, getStateLock, getTableKey, getVisit, handleUpdate, handleUpdate, toString, visit
Methods inherited from class com.illumon.iris.db.v2.locations.SubscriptionAggregator
activationFailed, activationSuccessful, checkHasSubscribers, postActivationHook, subscribe, supportsSubscriptions, unsubscribe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.locations.DeephavenFormatTableLocation
getFormat
Methods inherited from interface com.illumon.iris.db.v2.locations.TableLocation
append, as, clearColumnLocations, getColumnLocation, getColumnLocation, getDataIndex, getTableKey, getVisit, handleUpdate, subscribe, supportsSubscriptions, toGenericString, toStringDetailed, toStringHelper, unsubscribe, visit
Methods inherited from interface com.illumon.iris.db.v2.locations.TableLocationKey
getColumnPartition, getInternalPartition, writeTo
Methods inherited from interface com.illumon.iris.db.v2.locations.TableLocationState
copyStateValuesTo, getLastModifiedTimeMillis, getSize, getSizeStr, getStateLock, writeStateValuesTo
-
Constructor Details
-
ReadOnlyLocalTableLocation
public ReadOnlyLocalTableLocation(@NotNull TableKey tableKey, @NotNull TableLocationKey tableLocationKey, @NotNull File directory, boolean supportsSubscriptions, @Nullable TableDataRefreshService refreshService) Create a newReadOnlyLocalTableLocation
. Note that this class is intended for Deephaven internal use only and is subject to change without notice.- Parameters:
tableKey
- theTableKey
identifying the tabletableLocationKey
- theTableLocationKey
identifying the locationdirectory
- the directory in which the table files residesupportsSubscriptions
- if the location supports subscriptionsrefreshService
- the refresh service to use. If this is null, the location does not support subscriptions
-
-
Method Details
-
getImplementationName
Description copied from interface:NamedImplementation
Get a name for the implementing class. Useful for abstract classes that implement
LogOutputAppendable
or overridetoString
.The default implementation is correct, but not suitable for high-frequency usage.
- Returns:
- A name for the implementing class
-
refresh
public void refresh()Description copied from interface:TableLocation
Initialize or refresh state information. -
activateUnderlyingDataSource
protected void activateUnderlyingDataSource()Description copied from class:SubscriptionAggregator
Refresh and activate update pushing from the implementing class.
If the implementation will deliver notifications in a different thread than the one that calls this method, then this method must be asynchronous - that is, it must not block pending delivery of results. This requirement holds even if that other thread has nothing to do with the initial activation request!
Listeners should guard against duplicate notifications, especially if the implementation delivers synchronous notifications.
The implementation should call activationSuccessful() when done activating and delivering initial refresh results, unless activationFailed() was called instead.
Must be called under the subscription lock.
- Overrides:
activateUnderlyingDataSource
in classSubscriptionAggregator<TableLocation.Listener>
-
deactivateUnderlyingDataSource
protected void deactivateUnderlyingDataSource()Description copied from class:SubscriptionAggregator
Deactivate pushed updates from the implementing class. Must be called under the subscription lock.- Overrides:
deactivateUnderlyingDataSource
in classSubscriptionAggregator<TableLocation.Listener>
-
matchSubscriptionToken
protected <T> boolean matchSubscriptionToken(T token) Description copied from class:SubscriptionAggregator
Verify that a notification pertains to a currently-active subscription. Must be called under the subscription lock.- Overrides:
matchSubscriptionToken
in classSubscriptionAggregator<TableLocation.Listener>
- Parameters:
token
- A subscription-related object that the subclass can use to match a notification- Returns:
- True iff notification delivery should proceed
-