Class GCRules (2.10.3)

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
TypeDescription
GCRules

Methods

defaultRule()

public GCRules.DefaultRule defaultRule()

Creates an empty default rule

Returns
TypeDescription
GCRules.DefaultRule

fromProto(GcRule source)

public GCRules.GCRule fromProto(GcRule source)
Parameter
NameDescription
sourceGcRule
Returns
TypeDescription
GCRules.GCRule

intersection()

public GCRules.IntersectionRule intersection()

Creates a new instance of the IntersectionRule

Returns
TypeDescription
GCRules.IntersectionRule

maxAge(long maxAge, TimeUnit timeUnit)

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

Creates a new instance of the DurationRule

Parameters
NameDescription
maxAgelong
  • maximum age of the cell to keep
timeUnitTimeUnit
  • timeunit for the age
Returns
TypeDescription
GCRules.DurationRule

maxAge(Duration duration)

public GCRules.DurationRule maxAge(Duration duration)

Creates a new instance of the DurationRule

Parameter
NameDescription
durationorg.threeten.bp.Duration
  • age expressed as duration
Returns
TypeDescription
GCRules.DurationRule

maxVersions(int maxVersion)

public GCRules.VersionRule maxVersions(int maxVersion)

Creates a new instance of the VersionRule

Parameter
NameDescription
maxVersionint
  • maximum number of cell versions to keep
Returns
TypeDescription
GCRules.VersionRule

union()

public GCRules.UnionRule union()

Creates a new instance of the IntersectionRule

Returns
TypeDescription
GCRules.UnionRule