Class TableSnapshot

java.lang.Object
org.apache.cassandra.service.snapshot.TableSnapshot

public class TableSnapshot extends Object
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Unique identifier of a snapshot. Used only to deduplicate snapshots internally, not exposed externally. table_id may be empty for tables created prior to 2.1

      Format: "$ks:$table_name:$table_id:$tag"

    • getKeyspaceName

      public String getKeyspaceName()
    • getTableName

      public String getTableName()
    • getTag

      public String getTag()
    • getCreatedAt

      public Instant getCreatedAt()
    • getExpiresAt

      public Instant getExpiresAt()
    • isExpired

      public boolean isExpired(Instant now)
    • exists

      public boolean exists()
    • isEphemeral

      public boolean isEphemeral()
    • isExpiring

      public boolean isExpiring()
    • computeSizeOnDiskBytes

      public long computeSizeOnDiskBytes()
    • computeTrueSizeBytes

      public long computeTrueSizeBytes()
    • getDirectories

      public Collection<File> getDirectories()
    • getManifestFile

      public Optional<File> getManifestFile()
    • getSchemaFile

      public Optional<File> getSchemaFile()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • buildSnapshotId

      protected static String buildSnapshotId(String keyspaceName, String tableName, @Nullable UUID tableId, String tag)
    • shouldClearSnapshot

      public static Predicate<TableSnapshot> shouldClearSnapshot(String tag, long olderThanTimestamp)