Class GCRules (2.40.0)

public final class GCRules

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.

Inheritance

java.lang.Object > GCRules

Static Fields

GCRULES

public static final GCRules GCRULES

Factory method to create GCRules - entry point into the DSL.

Field Value
Type Description
GCRules

Methods

defaultRule()

public GCRules.DefaultRule defaultRule()

Creates an empty default rule

Returns
Type Description
GCRules.DefaultRule

fromProto(GcRule source)

public GCRules.GCRule fromProto(GcRule source)
Parameter
Name Description
source com.google.bigtable.admin.v2.GcRule
Returns
Type Description
GCRules.GCRule

intersection()

public GCRules.IntersectionRule intersection()

Creates a new instance of the IntersectionRule

Returns
Type Description
GCRules.IntersectionRule

maxAge(long maxAge, TimeUnit timeUnit)

public GCRules.DurationRule maxAge(long maxAge, TimeUnit timeUnit)

Creates a new instance of the DurationRule

Parameters
Name Description
maxAge long
  • maximum age of the cell to keep
timeUnit TimeUnit
  • timeunit for the age
Returns
Type Description
GCRules.DurationRule

maxAge(Duration duration)

public GCRules.DurationRule maxAge(Duration duration)

Creates a new instance of the DurationRule

Parameter
Name Description
duration org.threeten.bp.Duration
  • age expressed as duration
Returns
Type Description
GCRules.DurationRule

maxVersions(int maxVersion)

public GCRules.VersionRule maxVersions(int maxVersion)

Creates a new instance of the VersionRule

Parameter
Name Description
maxVersion int
  • maximum number of cell versions to keep
Returns
Type Description
GCRules.VersionRule

union()

public GCRules.UnionRule union()

Creates a new instance of the IntersectionRule

Returns
Type Description
GCRules.UnionRule