Class GeodeEmbeddedPolicy.RefCountPolicy
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- org.apache.calcite.adapter.geode.rel.GeodeEmbeddedPolicy
-
- org.apache.calcite.adapter.geode.rel.GeodeEmbeddedPolicy.RefCountPolicy
-
- All Implemented Interfaces:
org.junit.rules.TestRule
- Enclosing class:
- GeodeEmbeddedPolicy
private static class GeodeEmbeddedPolicy.RefCountPolicy extends GeodeEmbeddedPolicy
-
-
Field Summary
Fields Modifier and Type Field Description private GeodeEmbeddedPolicy
policy
private java.util.concurrent.atomic.AtomicInteger
refCount
-
Constructor Summary
Constructors Constructor Description RefCountPolicy(GeodeEmbeddedPolicy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
after()
void
before()
(package private) GeodeEmbeddedPolicy
share()
Allows this instance to be shared by multiple test classes (in parallel).-
Methods inherited from class org.apache.calcite.adapter.geode.rel.GeodeEmbeddedPolicy
cache, create
-
-
-
-
Field Detail
-
refCount
private final java.util.concurrent.atomic.AtomicInteger refCount
-
policy
private final GeodeEmbeddedPolicy policy
-
-
Constructor Detail
-
RefCountPolicy
RefCountPolicy(GeodeEmbeddedPolicy policy)
-
-
Method Detail
-
share
GeodeEmbeddedPolicy share()
Description copied from class:GeodeEmbeddedPolicy
Allows this instance to be shared by multiple test classes (in parallel). Guarantees thatbefore()
andafter()
methods will be called only once. This setup is useful for maven (surefire) plugin which executes tests in parallel (including@ClassRule
methods) and may initialize (or destroy) same resource multiple times.- Overrides:
share
in classGeodeEmbeddedPolicy
-
before
public void before()
- Overrides:
before
in classGeodeEmbeddedPolicy
-
after
protected void after()
- Overrides:
after
in classGeodeEmbeddedPolicy
-
-