Send feedback
Class GCRules (2.20.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
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.
Static Fields
GCRULES
public static final GCRules GCRULES
Factory method to create GCRules - entry point into the DSL.
Field Value
Methods
defaultRule()
public GCRules.DefaultRule defaultRule()
Creates an empty default rule
Returns
fromProto(GcRule source)
public GCRules.GCRule fromProto(GcRule source)
Parameter
Name Description source
com.google.bigtable.admin.v2.GcRule
Returns
intersection()
public GCRules.IntersectionRule intersection()
Creates a new instance of the IntersectionRule
Returns
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
Returns
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
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
union()
public GCRules.UnionRule union()
Creates a new instance of the IntersectionRule
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-03-21 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?