Interface TableLocationState
- All Known Subinterfaces:
TableLocation
- All Known Implementing Classes:
AbstractTableLocation
,NonexistentTableLocation
,ParquetTableLocation
,PythonTableDataService.TableLocationImpl
,TableLocationStateHolder
public interface TableLocationState
Interface for the mutable fields of a table location. Supports multi-value copy methods, so that applications needing
a consistent view of all fields can work with a local copy while only locking this object for a short while.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
copyStateValuesTo
(@NotNull TableLocationStateHolder destinationHolder) Copy all state values from this to the supplied holder.long
long
getSize()
@NotNull Object
-
Field Details
-
NULL_SIZE
static final long NULL_SIZE- See Also:
-
NULL_TIME
static final long NULL_TIME- See Also:
-
-
Method Details
-
getStateLock
- Returns:
- The Object that accessors should synchronize on if they want to invoke multiple getters with consistent results.
-
getRowSet
RowSet getRowSet()- Returns:
- The (possibly-empty)
RowSet
of a table location, ornull
if RowSet information is unknown or does not exist for this table location. - ApiNote:
- The returned RowSet will be a "copy", meaning the caller must
RowSet.close()
it when finished. - ImplNote:
- This RowSet must not have any key larger than
the region mask
.
-
getSize
long getSize()- Returns:
- The size of a table location:
NULL_SIZE
: Size information is unknown or does not exist for this location
>= 0
: The table location exists and has (possibly empty) data
-
getLastModifiedTimeMillis
long getLastModifiedTimeMillis()- Returns:
- The last modified time for a table location, in milliseconds from the epoch:
NULL_TIME
: Modification time information is unknown or does not exist for this location
>= 0
: The time this table was last modified, in milliseconds from the UTC epoch
-
copyStateValuesTo
@FinalDefault default boolean copyStateValuesTo(@NotNull @NotNull TableLocationStateHolder destinationHolder) Copy all state values from this to the supplied holder.- Parameters:
destinationHolder
- The destination for output- Returns:
- Whether any of destinationHolder's values changed
-