java.lang.Object
com.google.cloud.bigtable.admin.v2.models.GCRules

@BetaApi public final class GCRules extends Object
Wraps GcRule protocol buffer object and exposes a friendly API.

Note: Garbage collection executes opportunistically in the background, and so it's possible for reads to return a cell even if it matches the active GC expression for its family. Please use appropriate filters in your reads to exclude cells which are eligible for garbage collection.

  • Field Details

    • GCRULES

      public static final GCRules GCRULES
      Factory method to create GCRules - entry point into the DSL.
  • Method Details

    • intersection

      public GCRules.IntersectionRule intersection()
      Creates a new instance of the IntersectionRule
    • union

      public GCRules.UnionRule union()
      Creates a new instance of the IntersectionRule
    • maxVersions

      public GCRules.VersionRule maxVersions(int maxVersion)
      Creates a new instance of the VersionRule
      Parameters:
      maxVersion - - maximum number of cell versions to keep
    • maxAge

      public GCRules.DurationRule maxAge(long maxAge, TimeUnit timeUnit)
      Creates a new instance of the DurationRule
      Parameters:
      maxAge - - maximum age of the cell to keep
      timeUnit - - timeunit for the age
    • maxAge

      public GCRules.DurationRule maxAge(org.threeten.bp.Duration duration)
      Creates a new instance of the DurationRule
      Parameters:
      duration - - age expressed as duration
    • defaultRule

      public GCRules.DefaultRule defaultRule()
      Creates an empty default rule
    • fromProto

      @InternalApi public GCRules.GCRule fromProto(GcRule source)