use of com.google.cloud.bigtable.admin.v2.models.GCRules.IntersectionRule in project java-bigtable by googleapis.
the class TableAdminExampleTest method testCreateNestedRule.
@Test
public void testCreateNestedRule() {
// Nested rule
tableAdmin.addFamilyWithNestedRule();
VersionRule versionRule = GCRULES.maxVersions(10);
DurationRule maxAgeRule = GCRULES.maxAge(30, TimeUnit.DAYS);
VersionRule versionRule2 = GCRULES.maxVersions(2);
IntersectionRule intersectionRule = GCRULES.intersection().rule(maxAgeRule).rule(versionRule2);
UnionRule nestedCondition = GCRULES.union().rule(intersectionRule).rule(versionRule);
boolean nestedRule = ruleCheck(nestedCondition);
assertTrue(nestedRule);
}
Aggregations