Class GCRules
- java.lang.Object
-
- com.google.cloud.bigtable.admin.v2.models.GCRules
-
@BetaApi public final class GCRules extends Object
WrapsGcRule
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GCRules.DefaultRule
Wrapper for building a empty rulestatic class
GCRules.DurationRule
Wrapper for building max duration rulestatic interface
GCRules.GCRule
interface for fluent GcRule wrappersstatic class
GCRules.IntersectionRule
Fluent wrapper forGcRule.Intersection
rule.static class
GCRules.UnionRule
Fluent wrapper forGcRule.Union
rule.static class
GCRules.VersionRule
Wrapper for building max versions rule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GCRules.DefaultRule
defaultRule()
Creates an empty default ruleGCRules.GCRule
fromProto(GcRule source)
GCRules.IntersectionRule
intersection()
Creates a new instance of the IntersectionRuleGCRules.DurationRule
maxAge(long maxAge, TimeUnit timeUnit)
Creates a new instance of the DurationRuleGCRules.DurationRule
maxAge(org.threeten.bp.Duration duration)
Creates a new instance of the DurationRuleGCRules.VersionRule
maxVersions(int maxVersion)
Creates a new instance of the VersionRuleGCRules.UnionRule
union()
Creates a new instance of the IntersectionRule
-
-
-
Field Detail
-
GCRULES
public static final GCRules GCRULES
Factory method to create GCRules - entry point into the DSL.
-
-
Method Detail
-
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 keeptimeUnit
- - 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)
-
-