public final class GCRulesThis class is obsolete. For the recommended proto-based approach, please see GcRuleBuilder.
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 GCRULESFactory 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
|
timeUnit |
TimeUnit
|
| 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
|
| 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
|
| Returns | |
|---|---|
| Type | Description |
GCRules.VersionRule |
|
union()
public GCRules.UnionRule union()Creates a new instance of the IntersectionRule
| Returns | |
|---|---|
| Type | Description |
GCRules.UnionRule |
|